Search in sources :

Example 1 with DummyInternalSLDFile4

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

the class RenderPanelImplTest method testRasterData.

/**
 * Test method for {@link com.sldeditor.render.RenderPanelImpl#RenderPanelImpl()}.
 */
@Test
void testRasterData() {
    RenderPanelImpl render = new RenderPanelImpl(false);
    render.setSize(200, 200);
    RenderPanelImpl.setUnderTest(false);
    DummyInternalSLDFile4 testSLD = new DummyInternalSLDFile4();
    DataSourceInterface dataSource = DataSourceFactory.getDataSource();
    dataSource.connect("test", SLDEditorFile.getInstance(), CheckAttributeFactory.getCheckList());
    SelectedSymbol.getInstance().setSld(testSLD.getSLD());
    render.renderSymbol();
    render.dataSourceLoaded(GeometryTypeEnum.RASTER, false);
    render.dataSourceLoaded(GeometryTypeEnum.RASTER, false);
    render.useAntiAliasUpdated(true);
    assertNotNull(render.getRuleRenderOptions());
    render.backgroundColourUpdate(null);
    render.backgroundColourUpdate(Color.WHITE);
    RenderPanelImpl.setUnderTest(true);
    DataSourceFactory.reset();
    SelectedSymbol.destroyInstance();
}
Also used : DataSourceInterface(com.sldeditor.datasource.DataSourceInterface) RenderPanelImpl(com.sldeditor.render.RenderPanelImpl) DummyInternalSLDFile4(com.sldeditor.test.unit.datasource.impl.DummyInternalSLDFile4) Test(org.junit.jupiter.api.Test)

Aggregations

DataSourceInterface (com.sldeditor.datasource.DataSourceInterface)1 RenderPanelImpl (com.sldeditor.render.RenderPanelImpl)1 DummyInternalSLDFile4 (com.sldeditor.test.unit.datasource.impl.DummyInternalSLDFile4)1 Test (org.junit.jupiter.api.Test)1