Search in sources :

Example 1 with SLDEditorFileInterface

use of com.sldeditor.datasource.SLDEditorFileInterface in project sldeditor by robward-scisys.

the class CreateInternalDataSourceTest method testConnect.

/**
 * Test method for
 * {@link com.sldeditor.datasource.impl.CreateInternalDataSource#connect(com.sldeditor.datasource.SLDEditorFileInterface)}.
 */
@Test
public void testConnect() {
    CreateInternalDataSource ds = new CreateInternalDataSource();
    List<DataSourceInfo> dataSourceInfoList = ds.connect(null, null, null);
    DataSourceInfo dsInfo = dataSourceInfoList.get(0);
    assertTrue(dsInfo != null);
    assertNull(dsInfo.getDataStore());
    assertNull(dsInfo.getTypeName());
    SLDEditorFileInterface sldEditor = new DummyInternalSLDFile();
    dataSourceInfoList = ds.connect(null, null, sldEditor);
    dsInfo = dataSourceInfoList.get(0);
    assertTrue(dsInfo != null);
    assertTrue(dsInfo.getTypeName() != null);
    assertTrue(dsInfo.getDataStore() != null);
}
Also used : DataSourceInfo(com.sldeditor.datasource.impl.DataSourceInfo) CreateInternalDataSource(com.sldeditor.datasource.impl.CreateInternalDataSource) SLDEditorFileInterface(com.sldeditor.datasource.SLDEditorFileInterface) Test(org.junit.Test)

Example 2 with SLDEditorFileInterface

use of com.sldeditor.datasource.SLDEditorFileInterface in project sldeditor by robward-scisys.

the class CreateExternalDataSourceTest method testConnect.

/**
 * Test method for {@link com.sldeditor.datasource.impl.CreateExternalDataSource#connect(com.sldeditor.datasource.SLDEditorFileInterface)}.
 */
@Test
public void testConnect() {
    CreateExternalDataSource ds = new CreateExternalDataSource();
    List<DataSourceInfo> dataSourceInfoList = ds.connect(null, null, null);
    DataSourceInfo dsInfo = dataSourceInfoList.get(0);
    assertTrue(dsInfo != null);
    assertNull(dsInfo.getDataStore());
    assertNull(dsInfo.getTypeName());
    DummyExternalSLDFile dummyExternalSLDFile = new DummyExternalSLDFile();
    SLDEditorFileInterface sldEditor = dummyExternalSLDFile;
    dataSourceInfoList = ds.connect(dummyExternalSLDFile.getTypeName(), null, sldEditor);
    dsInfo = dataSourceInfoList.get(0);
    assertTrue(dsInfo != null);
    assertTrue(dsInfo.getTypeName() != null);
    assertTrue(dsInfo.getDataStore() != null);
}
Also used : DataSourceInfo(com.sldeditor.datasource.impl.DataSourceInfo) SLDEditorFileInterface(com.sldeditor.datasource.SLDEditorFileInterface) CreateExternalDataSource(com.sldeditor.datasource.impl.CreateExternalDataSource) Test(org.junit.Test)

Aggregations

SLDEditorFileInterface (com.sldeditor.datasource.SLDEditorFileInterface)2 DataSourceInfo (com.sldeditor.datasource.impl.DataSourceInfo)2 Test (org.junit.Test)2 CreateExternalDataSource (com.sldeditor.datasource.impl.CreateExternalDataSource)1 CreateInternalDataSource (com.sldeditor.datasource.impl.CreateInternalDataSource)1