Search in sources :

Example 1 with ProjectManagerStub

use of com.google.refine.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.ProjectManagerStub) StringWriter(java.io.StringWriter) ProjectMetadata(com.google.refine.ProjectMetadata) Properties(java.util.Properties) Engine(com.google.refine.browsing.Engine) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 2 with ProjectManagerStub

use of com.google.refine.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.ProjectManagerStub) StringWriter(java.io.StringWriter) ProjectMetadata(com.google.refine.ProjectMetadata) Properties(java.util.Properties) Engine(com.google.refine.browsing.Engine) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with ProjectManagerStub

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

the class XlsxExporterTests method SetUp.

@BeforeMethod
public void SetUp() {
    SUT = new XlsExporter(true);
    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.ProjectManagerStub) 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 4 with ProjectManagerStub

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

the class WikidataRefineTest method initServlet.

@BeforeMethod(alwaysRun = true)
public void initServlet() {
    servlet = new RefineServletStub();
    ProjectManager.singleton = new ProjectManagerStub();
    ImportingManager.initialize(servlet);
}
Also used : ProjectManagerStub(com.google.refine.ProjectManagerStub) RefineServletStub(com.google.refine.RefineServletStub) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 5 with ProjectManagerStub

use of com.google.refine.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.ProjectManagerStub) ProjectMetadata(com.google.refine.ProjectMetadata) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Properties(java.util.Properties) Engine(com.google.refine.browsing.Engine) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

ProjectManagerStub (com.google.refine.ProjectManagerStub)6 BeforeMethod (org.testng.annotations.BeforeMethod)6 ProjectMetadata (com.google.refine.ProjectMetadata)5 Engine (com.google.refine.browsing.Engine)5 Project (com.google.refine.model.Project)5 Properties (java.util.Properties)5 StringWriter (java.io.StringWriter)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 RefineServletStub (com.google.refine.RefineServletStub)1 SqlExporter (com.google.refine.exporters.sql.SqlExporter)1