Search in sources :

Example 6 with DummyExternalSLDFile

use of com.sldeditor.test.unit.datasource.impl.DummyExternalSLDFile in project sldeditor by robward-scisys.

the class SLDEditorMainTest method testGetSLDString.

/**
 * Test method for {@link com.sldeditor.SLDEditorMain#getSLDString()}.
 */
@Test
void testGetSLDString() {
    TestSLDEditorMain testObj = new TestSLDEditorMain(new JPanel());
    JFrame frame = new JFrame();
    Controller.getInstance().setFrame(frame);
    // SLD file
    DummyExternalSLDFile external = new DummyExternalSLDFile();
    SLDEditorFile.getInstance().setSLDData(external.getSLDData());
    assertNotNull(testObj.getSLDString());
    assertNotNull(testObj.getSLDString());
}
Also used : JPanel(javax.swing.JPanel) DummyExternalSLDFile(com.sldeditor.test.unit.datasource.impl.DummyExternalSLDFile) JFrame(javax.swing.JFrame) Test(org.junit.jupiter.api.Test)

Example 7 with DummyExternalSLDFile

use of com.sldeditor.test.unit.datasource.impl.DummyExternalSLDFile in project sldeditor by robward-scisys.

the class SLDEditorMainTest method testSaveSLDData.

/**
 * Test method for {@link
 * com.sldeditor.SLDEditorMain#saveSLDData(com.sldeditor.common.SLDDataInterface)}.
 */
@Test
void testSaveSLDData() {
    TestSLDEditorMain testObj = new TestSLDEditorMain(new JPanel());
    // SLD file
    DummyExternalSLDFile external = new DummyExternalSLDFile();
    testObj.saveSLDData(external.getSLDData());
}
Also used : JPanel(javax.swing.JPanel) DummyExternalSLDFile(com.sldeditor.test.unit.datasource.impl.DummyExternalSLDFile) Test(org.junit.jupiter.api.Test)

Aggregations

DummyExternalSLDFile (com.sldeditor.test.unit.datasource.impl.DummyExternalSLDFile)7 Test (org.junit.jupiter.api.Test)7 JPanel (javax.swing.JPanel)5 File (java.io.File)4 SLDEditorFile (com.sldeditor.datasource.SLDEditorFile)3 IOException (java.io.IOException)3 JFrame (javax.swing.JFrame)3 MalformedURLException (java.net.MalformedURLException)2 SLDEditorMain (com.sldeditor.SLDEditorMain)1 SLDDataInterface (com.sldeditor.common.SLDDataInterface)1 LegendPanelImage (com.sldeditor.ui.legend.LegendPanelImage)1 ImageFilter (com.sldeditor.ui.legend.filechooser.ImageFilter)1 Image (java.awt.Image)1 Clipboard (java.awt.datatransfer.Clipboard)1 StringSelection (java.awt.datatransfer.StringSelection)1 ArrayList (java.util.ArrayList)1 StyledLayer (org.geotools.styling.StyledLayer)1