Search in sources :

Example 1 with RefineServletStub

use of com.google.refine.tests.RefineServletStub 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)

Example 2 with RefineServletStub

use of com.google.refine.tests.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();
    job = ImportingManager.createJob();
    options = Mockito.mock(JSONObject.class);
}
Also used : Project(com.google.refine.model.Project) RefineServletStub(com.google.refine.tests.RefineServletStub) JSONObject(org.json.JSONObject) ProjectMetadata(com.google.refine.ProjectMetadata)

Aggregations

ProjectMetadata (com.google.refine.ProjectMetadata)2 Project (com.google.refine.model.Project)2 RefineServletStub (com.google.refine.tests.RefineServletStub)2 JSONObject (org.json.JSONObject)2 SeparatorBasedImporter (com.google.refine.importers.SeparatorBasedImporter)1 ProjectManagerStub (com.google.refine.tests.ProjectManagerStub)1 BeforeMethod (org.testng.annotations.BeforeMethod)1