use of com.sldeditor.ui.legend.option.LegendOptionData in project sldeditor by robward-scisys.
the class LegendOptionDataTest method testImageSize.
/**
* Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#getImageSize()}.
* Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#setImageSize(int)}.
*/
@Test
public void testImageSize() {
LegendOptionData data = new LegendOptionData();
int imageSize = 76;
data.setImageSize(imageSize);
assertEquals(imageSize, data.getImageSize());
}
use of com.sldeditor.ui.legend.option.LegendOptionData in project sldeditor by robward-scisys.
the class LegendOptionDataTest method testShowTitle.
/**
* Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#isShowTitle()}.
* Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#setShowTitle(boolean)}.
*/
@Test
public void testShowTitle() {
LegendOptionData data = new LegendOptionData();
data.setShowTitle(true);
assertTrue(data.isShowTitle());
data.setShowTitle(false);
assertFalse(data.isShowTitle());
}
use of com.sldeditor.ui.legend.option.LegendOptionData in project sldeditor by robward-scisys.
the class LegendOptionDataTest method testBorder.
/**
* Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#isBorder()}.
* Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#setBorder(boolean)}.
*/
@Test
public void testBorder() {
LegendOptionData data = new LegendOptionData();
data.setBorder(true);
assertTrue(data.isBorder());
data.setBorder(false);
assertFalse(data.isBorder());
}
use of com.sldeditor.ui.legend.option.LegendOptionData in project sldeditor by robward-scisys.
the class LegendOptionDataTest method testMaintainAspectRatio.
/**
* Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#isMaintainAspectRatio()}.
* Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#setMaintainAspectRatio(boolean)}.
*/
@Test
public void testMaintainAspectRatio() {
LegendOptionData data = new LegendOptionData();
int expectedWidth = 10;
int expectedheight = 20;
data.setMaintainAspectRatio(false);
data.setImageWidth(expectedWidth);
data.setImageHeight(expectedheight);
assertFalse(data.isMaintainAspectRatio());
assertEquals(expectedWidth, data.getImageWidth());
assertEquals(expectedheight, data.getImageHeight());
expectedWidth++;
expectedheight++;
data.setImageWidth(expectedWidth);
data.setImageHeight(expectedheight);
assertEquals(expectedWidth, data.getImageWidth());
assertEquals(expectedheight, data.getImageHeight());
data.setMaintainAspectRatio(true);
assertTrue(data.isMaintainAspectRatio());
data.setImageWidth(expectedWidth);
assertEquals(expectedWidth, data.getImageWidth());
assertEquals(expectedWidth, data.getImageHeight());
data.setImageWidth(expectedheight);
assertEquals(expectedheight, data.getImageWidth());
assertEquals(expectedheight, data.getImageHeight());
}
use of com.sldeditor.ui.legend.option.LegendOptionData in project sldeditor by robward-scisys.
the class LegendOptionDataTest method testBandInformation.
/**
* Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#isBandInformation()}.
* Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#setBandInformation(boolean)}.
*/
@Test
public void testBandInformation() {
LegendOptionData data = new LegendOptionData();
data.setBandInformation(true);
assertTrue(data.isBandInformation());
data.setBandInformation(false);
assertFalse(data.isBandInformation());
}
Aggregations