Search in sources :

Example 6 with PrefData

use of com.sldeditor.common.preferences.PrefData in project sldeditor by robward-scisys.

the class PrefDataTest method testVendorOptionVersionList.

/**
 * Test method for {@link com.sldeditor.common.preferences.PrefData#getVendorOptionVersionList()}.
 * Test method for {@link com.sldeditor.common.preferences.PrefData#setVendorOptionVersionList()}.
 */
@Test
public void testVendorOptionVersionList() {
    PrefData prefData = new PrefData();
    List<VersionData> vendorOptionList = new ArrayList<VersionData>();
    vendorOptionList.add(VendorOptionManager.getInstance().getDefaultVendorOptionVersionData());
    prefData.setVendorOptionVersionList(vendorOptionList);
    assertEquals(vendorOptionList, prefData.getVendorOptionVersionList());
}
Also used : PrefData(com.sldeditor.common.preferences.PrefData) VersionData(com.sldeditor.common.vendoroption.VersionData) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 7 with PrefData

use of com.sldeditor.common.preferences.PrefData in project sldeditor by robward-scisys.

the class PrefDataTest method testCheckAppVersionOnStartUp.

/**
 * Test method for {@link com.sldeditor.common.preferences.PrefData#setCheckAppVersionOnStartUp(boolean)}.
 * Test method for {@link com.sldeditor.common.preferences.PrefData#isCheckAppVersionOnStartUp()}.
 */
@Test
public void testCheckAppVersionOnStartUp() {
    PrefData prefData = new PrefData();
    prefData.setCheckAppVersionOnStartUp(false);
    assertFalse(prefData.isCheckAppVersionOnStartUp());
    prefData.setCheckAppVersionOnStartUp(true);
    assertTrue(prefData.isCheckAppVersionOnStartUp());
}
Also used : PrefData(com.sldeditor.common.preferences.PrefData) Test(org.junit.Test)

Example 8 with PrefData

use of com.sldeditor.common.preferences.PrefData in project sldeditor by robward-scisys.

the class PrefDataTest method testUiLayoutClass.

/**
 * Test method for {@link com.sldeditor.common.preferences.PrefData#getUiLayoutClass()}.
 * Test method for {@link com.sldeditor.common.preferences.PrefData#setUiLayoutClass(java.lang.String)}.
 */
@Test
public void testUiLayoutClass() {
    PrefData prefData = new PrefData();
    String uiLayoutClass = "perfect curve";
    prefData.setUiLayoutClass(uiLayoutClass);
    assertEquals(uiLayoutClass, prefData.getUiLayoutClass());
}
Also used : PrefData(com.sldeditor.common.preferences.PrefData) Test(org.junit.Test)

Example 9 with PrefData

use of com.sldeditor.common.preferences.PrefData in project sldeditor by robward-scisys.

the class PrefDataTest method testLastFolderViewed.

/**
 * Test method for {@link com.sldeditor.common.preferences.PrefData#geLastFolderViewed()}.
 * Test method for {@link com.sldeditor.common.preferences.PrefData#setLastFolderViewed(String)}.
 */
@Test
public void testLastFolderViewed() {
    PrefData prefData = new PrefData();
    String expectedValue = "last viewed folder";
    prefData.setLastFolderViewed(expectedValue);
    assertEquals(expectedValue, prefData.getLastFolderViewed());
}
Also used : PrefData(com.sldeditor.common.preferences.PrefData) Test(org.junit.Test)

Example 10 with PrefData

use of com.sldeditor.common.preferences.PrefData in project sldeditor by robward-scisys.

the class PrefDataTest method testClone.

/**
 * Test method for {@link com.sldeditor.common.preferences.PrefData#clone()}.
 */
@Test
public void testClone() {
    PrefData prefData = new PrefData();
    prefData.setUseAntiAlias(true);
    List<VersionData> vendorOptionList = new ArrayList<VersionData>();
    vendorOptionList.add(VendorOptionManager.getInstance().getDefaultVendorOptionVersionData());
    prefData.setVendorOptionVersionList(vendorOptionList);
    String uiLayoutClass = "perfect curve";
    prefData.setUiLayoutClass(uiLayoutClass);
    prefData.setLastFolderViewed("last folder");
    PrefData newObj = prefData.clone();
    assertEquals(newObj.getBackgroundColour(), prefData.getBackgroundColour());
    assertEquals(newObj.getUiLayoutClass(), prefData.getUiLayoutClass());
    assertEquals(newObj.getVendorOptionVersionList(), prefData.getVendorOptionVersionList());
    assertEquals(newObj.isUseAntiAlias(), prefData.isUseAntiAlias());
    assertEquals(newObj.isSaveLastFolderView(), prefData.isSaveLastFolderView());
    assertEquals(newObj.getLastViewedKey(), prefData.getLastViewedKey());
    assertEquals(newObj.getLastFolderViewed(), prefData.getLastFolderViewed());
    assertEquals(newObj.isCheckAppVersionOnStartUp(), prefData.isCheckAppVersionOnStartUp());
}
Also used : PrefData(com.sldeditor.common.preferences.PrefData) VersionData(com.sldeditor.common.vendoroption.VersionData) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Aggregations

PrefData (com.sldeditor.common.preferences.PrefData)20 Test (org.junit.Test)17 ArrayList (java.util.ArrayList)9 VersionData (com.sldeditor.common.vendoroption.VersionData)7 Color (java.awt.Color)5 GeoServerVendorOption (com.sldeditor.common.vendoroption.GeoServerVendorOption)3 PrefDataLastViewedEnum (com.sldeditor.common.preferences.PrefDataLastViewedEnum)2 GeoServerConnection (com.sldeditor.common.data.GeoServerConnection)1 SLDData (com.sldeditor.common.data.SLDData)1 SelectedFiles (com.sldeditor.common.filesystem.SelectedFiles)1 UndoEvent (com.sldeditor.common.undo.UndoEvent)1 VendorOptionVersion (com.sldeditor.common.vendoroption.VendorOptionVersion)1 VendorOptionInfo (com.sldeditor.common.vendoroption.info.VendorOptionInfo)1 MinimumVersion (com.sldeditor.common.vendoroption.minversion.MinimumVersion)1 VendorOptionPresent (com.sldeditor.common.vendoroption.minversion.VendorOptionPresent)1 FileSystemExtension (com.sldeditor.extension.filesystem.FileSystemExtension)1 GetMinimumVersionInterface (com.sldeditor.ui.panels.GetMinimumVersionInterface)1 File (java.io.File)1 FeatureTypeStyle (org.geotools.styling.FeatureTypeStyle)1 NamedLayer (org.geotools.styling.NamedLayer)1