Search in sources :

Example 1 with GWTBounds

use of org.opennms.features.poller.remote.gwt.client.GWTBounds in project opennms by OpenNMS.

the class BoundsBuilderTest method testAddOppositeCornerPoints.

@Test
public void testAddOppositeCornerPoints() {
    BoundsBuilder bldr = new BoundsBuilder();
    bldr.extend(0.0, 1.0);
    bldr.extend(1.0, 0.0);
    assertEquals(new GWTBounds(0.0, 0.0, 1.0, 1.0), bldr.getBounds());
}
Also used : GWTBounds(org.opennms.features.poller.remote.gwt.client.GWTBounds) BoundsBuilder(org.opennms.features.poller.remote.gwt.client.utils.BoundsBuilder) Test(org.junit.Test)

Example 2 with GWTBounds

use of org.opennms.features.poller.remote.gwt.client.GWTBounds in project opennms by OpenNMS.

the class BoundsBuilderTest method testExtendEastAndWrap.

@Test
public void testExtendEastAndWrap() {
    BoundsBuilder bldr = new BoundsBuilder();
    bldr.extend(0.0, 0.0);
    bldr.extend(0.0, 170.0);
    assertEquals(new GWTBounds(0.0, 0.0, 0, 170), bldr.getBounds());
    bldr.extend(0.0, -100.0);
    assertEquals(new GWTBounds(0, 0, 0, -100), bldr.getBounds());
}
Also used : GWTBounds(org.opennms.features.poller.remote.gwt.client.GWTBounds) BoundsBuilder(org.opennms.features.poller.remote.gwt.client.utils.BoundsBuilder) Test(org.junit.Test)

Example 3 with GWTBounds

use of org.opennms.features.poller.remote.gwt.client.GWTBounds in project opennms by OpenNMS.

the class BoundsBuilderTest method testAddNoPoints.

@Test
public void testAddNoPoints() {
    BoundsBuilder bldr = new BoundsBuilder();
    assertEquals(new GWTBounds(-90, -180, 90, 180), bldr.getBounds());
}
Also used : GWTBounds(org.opennms.features.poller.remote.gwt.client.GWTBounds) BoundsBuilder(org.opennms.features.poller.remote.gwt.client.utils.BoundsBuilder) Test(org.junit.Test)

Example 4 with GWTBounds

use of org.opennms.features.poller.remote.gwt.client.GWTBounds in project opennms by OpenNMS.

the class BoundsBuilderTest method testExtendWestAndWrap.

@Test
public void testExtendWestAndWrap() {
    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, 100.0);
    assertEquals(new GWTBounds(0, 100, 0, 0), bldr.getBounds());
}
Also used : GWTBounds(org.opennms.features.poller.remote.gwt.client.GWTBounds) BoundsBuilder(org.opennms.features.poller.remote.gwt.client.utils.BoundsBuilder) Test(org.junit.Test)

Example 5 with GWTBounds

use of org.opennms.features.poller.remote.gwt.client.GWTBounds in project opennms by OpenNMS.

the class BoundsBuilderTest method testExtendEastThenWest.

@Test
public void testExtendEastThenWest() {
    BoundsBuilder bldr = new BoundsBuilder();
    bldr.extend(0.0, 0.0);
    bldr.extend(0.0, 170.0);
    assertEquals(new GWTBounds(0.0, 0.0, 0, 170), bldr.getBounds());
    bldr.extend(0.0, -90.0);
    assertEquals(new GWTBounds(0, -90, 0, 170), bldr.getBounds());
}
Also used : GWTBounds(org.opennms.features.poller.remote.gwt.client.GWTBounds) BoundsBuilder(org.opennms.features.poller.remote.gwt.client.utils.BoundsBuilder) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)11 GWTBounds (org.opennms.features.poller.remote.gwt.client.GWTBounds)11 BoundsBuilder (org.opennms.features.poller.remote.gwt.client.utils.BoundsBuilder)11 GWTLatLng (org.opennms.features.poller.remote.gwt.client.GWTLatLng)1