Search in sources :

Example 1 with RefineDbServletStub

use of com.google.refine.extension.database.stub.RefineDbServletStub in project OpenRefine by OpenRefine.

the class SavedConnectionCommandTest method setUp.

@BeforeMethod
public void setUp() throws IOException {
    MockitoAnnotations.initMocks(this);
    File dir = DBExtensionTestUtils.createTempDirectory("OR_DBExtension_Test_WorkspaceDir");
    FileProjectManager.initialize(dir);
    servlet = new RefineDbServletStub();
    ImportingManager.initialize(servlet);
    project = new Project();
    metadata = new ProjectMetadata();
    // job = ImportingManager.createJob();
    metadata.setName("Save DB Config  Test Project");
    ProjectManager.singleton.registerProject(project, metadata);
    SUT = new SavedConnectionCommand();
}
Also used : Project(com.google.refine.model.Project) ProjectMetadata(com.google.refine.ProjectMetadata) RefineDbServletStub(com.google.refine.extension.database.stub.RefineDbServletStub) File(java.io.File) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 2 with RefineDbServletStub

use of com.google.refine.extension.database.stub.RefineDbServletStub in project OpenRefine by OpenRefine.

the class DatabaseImportControllerTest method setUp.

@BeforeMethod
public void setUp() throws IOException {
    MockitoAnnotations.initMocks(this);
    File dir = DBExtensionTestUtils.createTempDirectory("OR_DBExtension_Test_WorkspaceDir");
    FileProjectManager.initialize(dir);
    servlet = new RefineDbServletStub();
    ImportingManager.initialize(servlet);
    project = new Project();
    metadata = new ProjectMetadata();
    job = ImportingManager.createJob();
    metadata.setName("Database Import Test Project");
    ProjectManager.singleton.registerProject(project, metadata);
    SUT = new DatabaseImportController();
}
Also used : Project(com.google.refine.model.Project) ProjectMetadata(com.google.refine.ProjectMetadata) RefineDbServletStub(com.google.refine.extension.database.stub.RefineDbServletStub) File(java.io.File) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

ProjectMetadata (com.google.refine.ProjectMetadata)2 RefineDbServletStub (com.google.refine.extension.database.stub.RefineDbServletStub)2 Project (com.google.refine.model.Project)2 File (java.io.File)2 BeforeMethod (org.testng.annotations.BeforeMethod)2