use of com.google.refine.RefineServletStub in project OpenRefine by OpenRefine.
the class KeyValueColumnizeTests method SetUp.
@BeforeMethod
public void SetUp() throws IOException, ModelException {
servlet = new RefineServletStub();
File dir = TestUtils.createTempDirectory("openrefine-test-workspace-dir");
FileProjectManager.initialize(dir);
project = new Project();
pm = new ProjectMetadata();
pm.setName("KeyValueColumnize test");
ProjectManager.singleton.registerProject(project, pm);
options = mock(ObjectNode.class);
OperationRegistry.registerOperation(getCoreModule(), "key-value-columnize", KeyValueColumnizeOperation.class);
ImportingManager.initialize(servlet);
job = ImportingManager.createJob();
importer = new SeparatorBasedImporter();
}
use of com.google.refine.RefineServletStub 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);
}
use of com.google.refine.RefineServletStub in project OpenRefine by OpenRefine.
the class ImporterTest method setUp.
public void setUp() {
// FIXME - should we try and use mock(Project.class); - seems unnecessary complexity
servlet = new RefineServletStub();
ImportingManager.initialize(servlet);
project = new Project();
metadata = new ProjectMetadata();
ImportingJob spiedJob = ImportingManager.createJob();
job = Mockito.spy(spiedJob);
when(job.getRetrievalRecord()).thenReturn(ParsingUtilities.mapper.createObjectNode());
options = Mockito.mock(ObjectNode.class);
}
Aggregations