use of com.sldeditor.filter.v2.envvar.WMSEnvVarValues in project sldeditor by robward-scisys.
the class EnvironmentVariableManagerTest method testSetWMSEnvVarValues.
/**
* Test method for {@link
* com.sldeditor.filter.v2.envvar.EnvironmentVariableManager#setWMSEnvVarValues(com.sldeditor.filter.v2.envvar.WMSEnvVarValues)}.
*/
@Test
public void testSetWMSEnvVarValues() {
EnvironmentVariableManager.getInstance().setWMSEnvVarValues(null);
WMSEnvVarValues wmsEnvVar = new WMSEnvVarValues();
wmsEnvVar.setImageHeight(42);
wmsEnvVar.setImageWidth(454);
Envelope envelope = new Envelope(1.0, 2.0, 50.0, 51.1);
ReferencedEnvelope mapBounds = ReferencedEnvelope.create(envelope, CoordManager.getInstance().getWGS84());
wmsEnvVar.setMapBounds(mapBounds);
EnvironmentVariableManager.getInstance().setWMSEnvVarValues(wmsEnvVar);
// Update the values again
WMSEnvVarValues wmsEnvVar2 = new WMSEnvVarValues();
wmsEnvVar2.setImageHeight(69);
wmsEnvVar2.setImageWidth(123);
Envelope envelope2 = new Envelope(-1.0, -2.0, 50.0, 51.1);
ReferencedEnvelope mapBounds2 = ReferencedEnvelope.create(envelope2, CoordManager.getInstance().getWGS84());
wmsEnvVar2.setMapBounds(mapBounds2);
EnvironmentVariableManager.getInstance().setWMSEnvVarValues(wmsEnvVar2);
}
Aggregations