Search in sources :

Example 1 with Engine

use of com.google.refine.browsing.Engine 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 Engine

use of com.google.refine.browsing.Engine in project OpenRefine by OpenRefine.

the class CsvExporterTests method SetUp.

@BeforeMethod
public void SetUp() {
    SUT = new CsvExporter();
    writer = new StringWriter();
    project = new Project();
    engine = new Engine(project);
    options = mock(Properties.class);
}
Also used : Project(com.google.refine.model.Project) StringWriter(java.io.StringWriter) CsvExporter(com.google.refine.exporters.CsvExporter) Properties(java.util.Properties) Engine(com.google.refine.browsing.Engine) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with Engine

use of com.google.refine.browsing.Engine 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 4 with Engine

use of com.google.refine.browsing.Engine 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 5 with Engine

use of com.google.refine.browsing.Engine in project OpenRefine by OpenRefine.

the class TsvExporterTests method SetUp.

@BeforeMethod
public void SetUp() {
    //new TsvExporter();
    SUT = new CsvExporter('\t');
    writer = new StringWriter();
    project = new Project();
    engine = new Engine(project);
    options = mock(Properties.class);
}
Also used : Project(com.google.refine.model.Project) StringWriter(java.io.StringWriter) CsvExporter(com.google.refine.exporters.CsvExporter) Properties(java.util.Properties) Engine(com.google.refine.browsing.Engine) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

Engine (com.google.refine.browsing.Engine)54 Project (com.google.refine.model.Project)37 Properties (java.util.Properties)21 Test (org.testng.annotations.Test)18 BeforeMethod (org.testng.annotations.BeforeMethod)16 StringWriter (java.io.StringWriter)12 RefineTest (com.google.refine.RefineTest)11 ProjectMetadata (com.google.refine.ProjectMetadata)10 ArrayList (java.util.ArrayList)10 IOException (java.io.IOException)9 ServletException (javax.servlet.ServletException)9 FilteredRows (com.google.refine.browsing.FilteredRows)8 HistoryEntry (com.google.refine.history.HistoryEntry)8 Column (com.google.refine.model.Column)8 Cell (com.google.refine.model.Cell)7 ProjectManagerStub (com.google.refine.ProjectManagerStub)5 RowVisitor (com.google.refine.browsing.RowVisitor)5 WikidataRefineTest (org.openrefine.wikidata.testing.WikidataRefineTest)5 Change (com.google.refine.history.Change)4 Row (com.google.refine.model.Row)4