use of com.google.refine.model.Project 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);
}
use of com.google.refine.model.Project 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);
}
use of com.google.refine.model.Project 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);
}
use of com.google.refine.model.Project 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);
}
use of com.google.refine.model.Project in project OpenRefine by OpenRefine.
the class CacheTests method SetUp.
@BeforeMethod
public void SetUp() throws JSONException, IOException, ModelException {
File dir = TestUtils.createTempDirectory("openrefine-test-workspace-dir");
FileProjectManager.initialize(dir);
project = new Project();
ProjectMetadata pm = new ProjectMetadata();
pm.setName("TNG Test Project");
ProjectManager.singleton.registerProject(project, pm);
int index = project.columnModel.allocateNewCellIndex();
Column column = new Column(index, "Column A");
project.columnModel.addColumn(index, column, true);
options = mock(Properties.class);
engine = new Engine(project);
engine_config = new JSONObject(ENGINE_JSON_DUPLICATES);
// engine_config.getJSONArray("facets").getJSONObject(0).getJSONArray("selection").put(new JSONArray());
engine.initializeFromJSON(engine_config);
engine.setMode(Engine.Mode.RowBased);
bindings = new Properties();
bindings.put("project", project);
}
Aggregations