Search in sources :

Example 1 with DataSourceConnectorEmpty

use of com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty in project sldeditor by robward-scisys.

the class DataSourceConnectorFactory method populate.

/**
 * Populate.
 */
private static void populate() {
    noDataSource = new DataSourceConnectorEmpty();
    dataSource = new DataSourceConnector();
    populate_internal(noDataSource);
    populate_internal(dataSource);
}
Also used : DataSourceConnector(com.sldeditor.datasource.connector.instance.DataSourceConnector) DataSourceConnectorEmpty(com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty)

Example 2 with DataSourceConnectorEmpty

use of com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty in project sldeditor by robward-scisys.

the class DataSourceConnectorEmptyTest method testGetDataSourceProperties.

/**
 * Test method for {@link com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty#getDataSourceProperties(java.util.Map)}.
 */
@Test
public void testGetDataSourceProperties() {
    DataSourceConnectorEmpty dsc = new DataSourceConnectorEmpty();
    Map<String, Object> propertyMap = new HashMap<String, Object>();
    assertNull(dsc.getDataSourceProperties(propertyMap));
    assertNull(dsc.getDataSourceProperties(null));
}
Also used : DataSourceConnectorEmpty(com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty) HashMap(java.util.HashMap) Test(org.junit.Test)

Example 3 with DataSourceConnectorEmpty

use of com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty in project sldeditor by robward-scisys.

the class DataSourceConnectorEmptyTest method testIsEmpty.

/**
 * Test method for {@link com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty#isEmpty()}.
 */
@Test
public void testIsEmpty() {
    DataSourceConnectorEmpty dsc = new DataSourceConnectorEmpty();
    assertTrue(dsc.isEmpty());
}
Also used : DataSourceConnectorEmpty(com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty) Test(org.junit.Test)

Example 4 with DataSourceConnectorEmpty

use of com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty in project sldeditor by robward-scisys.

the class DataSourceConnectorEmptyTest method testAccept.

/**
 * Test method for {@link com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty#accept(java.util.Map)}.
 */
@Test
public void testAccept() {
    DataSourceConnectorEmpty dsc = new DataSourceConnectorEmpty();
    assertNull(dsc.accept((String) null));
    assertFalse(dsc.accept((Map<String, Object>) null));
    Map<String, Object> propertyMap = new HashMap<String, Object>();
    assertFalse(dsc.accept(propertyMap));
}
Also used : DataSourceConnectorEmpty(com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty) HashMap(java.util.HashMap) Map(java.util.Map) HashMap(java.util.HashMap) Test(org.junit.Test)

Example 5 with DataSourceConnectorEmpty

use of com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty in project sldeditor by robward-scisys.

the class DataSourceConnectorEmptyTest method testGetConnectionProperties.

/**
 * Test method for {@link com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty#getConnectionProperties(com.sldeditor.DataSourcePropertiesInterface)}.
 */
@Test
public void testGetConnectionProperties() {
    DataSourceConnectorEmpty dsc = new DataSourceConnectorEmpty();
    assertNull(dsc.getConnectionProperties(null));
    DataSourcePropertiesInterface noDataSource = DataSourceConnectorFactory.getNoDataSource();
    Map<String, String> expectedPropertyMap = new HashMap<String, String>();
    assertEquals(expectedPropertyMap, dsc.getConnectionProperties(noDataSource));
}
Also used : DataSourceConnectorEmpty(com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty) HashMap(java.util.HashMap) DataSourcePropertiesInterface(com.sldeditor.common.DataSourcePropertiesInterface) Test(org.junit.Test)

Aggregations

DataSourceConnectorEmpty (com.sldeditor.datasource.connector.instance.DataSourceConnectorEmpty)8 Test (org.junit.Test)7 HashMap (java.util.HashMap)3 DataSourcePropertiesInterface (com.sldeditor.common.DataSourcePropertiesInterface)1 DataSourceConnector (com.sldeditor.datasource.connector.instance.DataSourceConnector)1 Map (java.util.Map)1