Search in sources :

Example 41 with SLDData

use of com.sldeditor.common.data.SLDData in project sldeditor by robward-scisys.

the class SLDDataTest method testLegendOptions.

/**
 * Test legend options.
 */
@Test
public void testLegendOptions() {
    SLDData data = new SLDData(null, null);
    LegendOptionData legendOptions = null;
    assertNotNull(data.getLegendOptions());
    data.setLegendOptions(legendOptions);
    assertNotNull(data.getLegendOptions());
    legendOptions = new LegendOptionData();
    data.setLegendOptions(legendOptions);
    assertEquals(legendOptions, data.getLegendOptions());
}
Also used : SLDData(com.sldeditor.common.data.SLDData) LegendOptionData(com.sldeditor.ui.legend.option.LegendOptionData) Test(org.junit.Test)

Example 42 with SLDData

use of com.sldeditor.common.data.SLDData in project sldeditor by robward-scisys.

the class SLDDataTest method testFieldList.

/**
 * Test field list.
 */
@Test
public void testFieldList() {
    List<DataSourceAttributeData> fieldList = new ArrayList<DataSourceAttributeData>();
    fieldList.add(new DataSourceAttributeData("Field 1", String.class, null));
    fieldList.add(new DataSourceAttributeData("Field 2", Double.class, null));
    SLDData data = new SLDData(null, null);
    data.setFieldList(fieldList);
    assertEquals(fieldList, data.getFieldList());
}
Also used : SLDData(com.sldeditor.common.data.SLDData) DataSourceAttributeData(com.sldeditor.datasource.attribute.DataSourceAttributeData) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 43 with SLDData

use of com.sldeditor.common.data.SLDData in project sldeditor by robward-scisys.

the class SLDDataTest method testConnectionData.

/**
 * Test connection data.
 */
@Test
public void testConnectionData() {
    SLDData data = new SLDData(null, null);
    GeoServerConnection connectionData = new GeoServerConnection();
    data.setConnectionData(connectionData);
    assertEquals(connectionData, data.getConnectionData());
}
Also used : SLDData(com.sldeditor.common.data.SLDData) GeoServerConnection(com.sldeditor.common.data.GeoServerConnection) Test(org.junit.Test)

Example 44 with SLDData

use of com.sldeditor.common.data.SLDData in project sldeditor by robward-scisys.

the class SLDDataTest method testReadOnly.

/**
 * Test read only.
 */
@Test
public void testReadOnly() {
    SLDData data = new SLDData(null, null);
    data.setReadOnly(true);
    assertTrue(data.isReadOnly());
    data.setReadOnly(false);
    assertFalse(data.isReadOnly());
}
Also used : SLDData(com.sldeditor.common.data.SLDData) Test(org.junit.Test)

Example 45 with SLDData

use of com.sldeditor.common.data.SLDData in project sldeditor by robward-scisys.

the class SLDDataTest method testStyle.

/**
 * Test style.
 */
@Test
public void testStyle() {
    StyleWrapper styleWrapper = new StyleWrapper("workspace", "style");
    SLDData data = new SLDData(styleWrapper, null);
    assertEquals(styleWrapper, data.getStyle());
}
Also used : SLDData(com.sldeditor.common.data.SLDData) StyleWrapper(com.sldeditor.common.data.StyleWrapper) Test(org.junit.Test)

Aggregations

SLDData (com.sldeditor.common.data.SLDData)68 Test (org.junit.Test)54 StyleWrapper (com.sldeditor.common.data.StyleWrapper)35 File (java.io.File)27 StyledLayerDescriptor (org.geotools.styling.StyledLayerDescriptor)24 SLDDataInterface (com.sldeditor.common.SLDDataInterface)20 IOException (java.io.IOException)20 URL (java.net.URL)16 ArrayList (java.util.ArrayList)14 FileTreeNode (com.sldeditor.datasource.extension.filesystem.node.file.FileTreeNode)8 SLDFileHandlerTest (com.sldeditor.test.unit.extension.filesystem.file.sld.SLDFileHandlerTest)8 GeoServerConnection (com.sldeditor.common.data.GeoServerConnection)7 FileNotFoundException (java.io.FileNotFoundException)7 URISyntaxException (java.net.URISyntaxException)7 MalformedURLException (java.net.MalformedURLException)6 NamedLayer (org.geotools.styling.NamedLayer)6 Style (org.geotools.styling.Style)6 SLDWriterInterface (com.sldeditor.common.output.SLDWriterInterface)5 FeatureTypeStyle (org.geotools.styling.FeatureTypeStyle)5 VersionData (com.sldeditor.common.vendoroption.VersionData)4