Search in sources :

Example 1 with ProjectManagerStub

use of com.google.refine.tests.ProjectManagerStub in project OpenRefine by OpenRefine.

the class XlsExporterTests method SetUp.

@BeforeMethod
public void SetUp() {
    SUT = new XlsExporter(false);
    stream = new ByteArrayOutputStream();
    ProjectManager.singleton = new ProjectManagerStub();
    projectMetadata = new ProjectMetadata();
    project = new Project();
    projectMetadata.setName(TEST_PROJECT_NAME);
    ProjectManager.singleton.registerProject(project, projectMetadata);
    engine = new Engine(project);
    options = mock(Properties.class);
}
Also used : Project(com.google.refine.model.Project) ProjectManagerStub(com.google.refine.tests.ProjectManagerStub) XlsExporter(com.google.refine.exporters.XlsExporter) ProjectMetadata(com.google.refine.ProjectMetadata) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Properties(java.util.Properties) Engine(com.google.refine.browsing.Engine) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 2 with ProjectManagerStub

use of com.google.refine.tests.ProjectManagerStub in project OpenRefine by OpenRefine.

the class HtmlExporterTests method SetUp.

@BeforeMethod
public void SetUp() {
    SUT = new HtmlTableExporter();
    writer = new StringWriter();
    ProjectManager.singleton = new ProjectManagerStub();
    projectMetadata = new ProjectMetadata();
    project = new Project();
    projectMetadata.setName(TEST_PROJECT_NAME);
    ProjectManager.singleton.registerProject(project, projectMetadata);
    engine = new Engine(project);
    options = mock(Properties.class);
}
Also used : Project(com.google.refine.model.Project) ProjectManagerStub(com.google.refine.tests.ProjectManagerStub) StringWriter(java.io.StringWriter) ProjectMetadata(com.google.refine.ProjectMetadata) HtmlTableExporter(com.google.refine.exporters.HtmlTableExporter) Properties(java.util.Properties) Engine(com.google.refine.browsing.Engine) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with ProjectManagerStub

use of com.google.refine.tests.ProjectManagerStub in project OpenRefine by OpenRefine.

the class TemplatingExporterTests method SetUp.

@BeforeMethod
public void SetUp() {
    SUT = new TemplatingExporter();
    writer = new StringWriter();
    ProjectManager.singleton = new ProjectManagerStub();
    projectMetadata = new ProjectMetadata();
    project = new Project();
    projectMetadata.setName(TEST_PROJECT_NAME);
    ProjectManager.singleton.registerProject(project, projectMetadata);
    engine = new Engine(project);
    options = mock(Properties.class);
}
Also used : Project(com.google.refine.model.Project) ProjectManagerStub(com.google.refine.tests.ProjectManagerStub) StringWriter(java.io.StringWriter) ProjectMetadata(com.google.refine.ProjectMetadata) TemplatingExporter(com.google.refine.exporters.TemplatingExporter) Properties(java.util.Properties) Engine(com.google.refine.browsing.Engine) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 4 with ProjectManagerStub

use of com.google.refine.tests.ProjectManagerStub in project OpenRefine by OpenRefine.

the class TransposeTests method SetUp.

@BeforeMethod
public void SetUp() {
    servlet = new RefineServletStub();
    ProjectManager.singleton = new ProjectManagerStub();
    ImportingManager.initialize(servlet);
    project = new Project();
    metadata = new ProjectMetadata();
    job = ImportingManager.createJob();
    options = mock(JSONObject.class);
    importer = new SeparatorBasedImporter();
}
Also used : Project(com.google.refine.model.Project) ProjectManagerStub(com.google.refine.tests.ProjectManagerStub) RefineServletStub(com.google.refine.tests.RefineServletStub) JSONObject(org.json.JSONObject) ProjectMetadata(com.google.refine.ProjectMetadata) SeparatorBasedImporter(com.google.refine.importers.SeparatorBasedImporter) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

ProjectMetadata (com.google.refine.ProjectMetadata)4 Project (com.google.refine.model.Project)4 ProjectManagerStub (com.google.refine.tests.ProjectManagerStub)4 BeforeMethod (org.testng.annotations.BeforeMethod)4 Engine (com.google.refine.browsing.Engine)3 Properties (java.util.Properties)3 StringWriter (java.io.StringWriter)2 HtmlTableExporter (com.google.refine.exporters.HtmlTableExporter)1 TemplatingExporter (com.google.refine.exporters.TemplatingExporter)1 XlsExporter (com.google.refine.exporters.XlsExporter)1 SeparatorBasedImporter (com.google.refine.importers.SeparatorBasedImporter)1 RefineServletStub (com.google.refine.tests.RefineServletStub)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 JSONObject (org.json.JSONObject)1