Search in sources :

Example 1 with GeoServerVendorOption

use of com.sldeditor.common.vendoroption.GeoServerVendorOption in project sldeditor by robward-scisys.

the class GeoServerVendorOptionTest method testGetVersionStringList.

/**
 * Test method for {@link com.sldeditor.common.vendoroption.GeoServerVendorOption#getVersionStringList()}.
 * Test method for {@link com.sldeditor.common.vendoroption.GeoServerVendorOption#addVersion(com.sldeditor.common.vendoroption.VersionData)}.
 * Test method for {@link com.sldeditor.common.vendoroption.GeoServerVendorOption#getVersion(java.lang.String)}.
 * Test method for {@link com.sldeditor.common.vendoroption.GeoServerVendorOption#getVersionList()}.
 */
@Test
public void testGetVersionStringList() {
    GeoServerVendorOption vendorOption = new GeoServerVendorOption();
    assertEquals(0, vendorOption.getVersionStringList().size());
    assertEquals(0, vendorOption.getVersionList().size());
    // This should be ignored
    vendorOption.addVersion(null);
    assertEquals(0, vendorOption.getVersionStringList().size());
    assertEquals(0, vendorOption.getVersionList().size());
    VersionData versionData1 = new VersionData();
    vendorOption.addVersion(versionData1);
    assertEquals(1, vendorOption.getVersionStringList().size());
    assertEquals(1, vendorOption.getVersionList().size());
    VersionData versionData2 = new VersionData();
    vendorOption.addVersion(versionData2);
    assertEquals(2, vendorOption.getVersionStringList().size());
    assertEquals(2, vendorOption.getVersionList().size());
    List<VersionData> voList = vendorOption.getVersionList();
    assertEquals(versionData1, voList.get(0));
    assertEquals(versionData2, voList.get(1));
    List<String> voStringList = vendorOption.getVersionStringList();
    assertEquals(versionData1.getVersionString(), voStringList.get(0));
    assertEquals(versionData2.getVersionString(), voStringList.get(1));
}
Also used : GeoServerVendorOption(com.sldeditor.common.vendoroption.GeoServerVendorOption) VersionData(com.sldeditor.common.vendoroption.VersionData) Test(org.junit.Test)

Example 2 with GeoServerVendorOption

use of com.sldeditor.common.vendoroption.GeoServerVendorOption in project sldeditor by robward-scisys.

the class GeoServerVendorOptionTest method testGetName.

/**
 * Test method for {@link com.sldeditor.common.vendoroption.GeoServerVendorOption#getName()}.
 */
@Test
public void testGetName() {
    GeoServerVendorOption vendorOption = new GeoServerVendorOption();
    assertEquals("GeoServer", vendorOption.getName());
}
Also used : GeoServerVendorOption(com.sldeditor.common.vendoroption.GeoServerVendorOption) Test(org.junit.Test)

Aggregations

GeoServerVendorOption (com.sldeditor.common.vendoroption.GeoServerVendorOption)2 Test (org.junit.Test)2 VersionData (com.sldeditor.common.vendoroption.VersionData)1