use of org.opennms.features.poller.remote.gwt.client.GWTBounds in project opennms by OpenNMS.
the class BoundsBuilderTest method testAddOnePoint.
@Test
public void testAddOnePoint() {
BoundsBuilder bldr = new BoundsBuilder();
GWTLatLng origin = new GWTLatLng(0.0, 0.0);
bldr.extend(origin);
assertEquals(new GWTBounds(origin, origin), bldr.getBounds());
}
use of org.opennms.features.poller.remote.gwt.client.GWTBounds in project opennms by OpenNMS.
the class BoundsBuilderTest method testAddTwoCornerPoints.
@Test
public void testAddTwoCornerPoints() {
BoundsBuilder bldr = new BoundsBuilder();
bldr.extend(0.0, 0.0);
bldr.extend(1.0, 1.0);
assertEquals(new GWTBounds(0.0, 0.0, 1.0, 1.0), bldr.getBounds());
}
use of org.opennms.features.poller.remote.gwt.client.GWTBounds in project opennms by OpenNMS.
the class BoundsBuilderTest method testDatelinePoints.
@Test
public void testDatelinePoints() {
BoundsBuilder bldr = new BoundsBuilder();
bldr.extend(40, -170);
bldr.extend(30, 170);
assertEquals(new GWTBounds(30, 170, 40, -170), bldr.getBounds());
}
use of org.opennms.features.poller.remote.gwt.client.GWTBounds in project opennms by OpenNMS.
the class BoundsBuilderTest method testExtendWestThenEast.
@Test
public void testExtendWestThenEast() {
BoundsBuilder bldr = new BoundsBuilder();
bldr.extend(0.0, 0.0);
bldr.extend(0.0, -170.0);
assertEquals(new GWTBounds(0.0, -170, 0, 0), bldr.getBounds());
bldr.extend(0.0, 90.0);
assertEquals(new GWTBounds(0, -170, 0, 90), bldr.getBounds());
}
use of org.opennms.features.poller.remote.gwt.client.GWTBounds in project opennms by OpenNMS.
the class BoundsBuilderTest method testAddManyPoints.
@Test
public void testAddManyPoints() {
BoundsBuilder bldr = new BoundsBuilder();
for (int i = 0; i <= 10; i++) {
bldr.extend(0.0 + i, 0.0);
bldr.extend(0.0, 0.0 - i);
}
assertEquals(new GWTBounds(0.0, -10.0, 10.0, 0.0), bldr.getBounds());
}
Aggregations