Examples of GeographicLocation


Examples of de.ailis.jollada.model.GeographicLocation

    @Test
    public void testFullConstructor()
    {
        final Asset asset = new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T");
        assertEquals(1, asset.getCreated());
        assertEquals(2, asset.getModified());
        assertEquals(new Unit(2, "m"), asset.getUnit());
        assertEquals(UpAxis.X_UP, asset.getUpAxis());
        assertEquals("R", asset.getRevision());
View Full Code Here

Examples of de.ailis.jollada.model.GeographicLocation

    @Test
    public void testGeographicLocation()
    {
        final Asset asset = new Asset();
        asset.setGeographicLocation(new GeographicLocation(1, 2, 3));
        assertEquals(new GeographicLocation(1, 2, 3),
            asset.getGeographicLocation());
    }
View Full Code Here

Examples of de.ailis.jollada.model.GeographicLocation

    @Test
    public void testEquals()
    {
        final Asset asset = new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T");
        assertTrue(asset.equals(asset));
        assertTrue(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T")));
        assertFalse(asset.equals(null));
        assertFalse(asset.equals("something"));
        assertFalse(asset.equals(new Asset(2, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T")));
        assertFalse(asset.equals(new Asset(1, 3, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T")));
        assertFalse(asset.equals(new Asset(1, 2, new Unit(3, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T")));
        assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.Y_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T")));
        assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(2, 2, 3), "R", "S", "T")));
        assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R2", "S", "T")));
        assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S2", "T")));
        assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T2")));

        assertFalse(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            null, "R", "S", "T").equals(asset));
        assertFalse(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), null, "S", "T").equals(asset));
        assertFalse(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", null, "T").equals(asset));
        assertFalse(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", null).equals(asset));

        assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            null, "R", "S", "T")));
        assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), null, "S", "T")));
        assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", null, "T")));
        assertFalse(asset.equals(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", null)));

        assertTrue(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            null, "R", "S", "T").equals(new Asset(1,
            2, new Unit(2, "m"), UpAxis.X_UP, null, "R", "S", "T")));
        assertTrue(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), null, "S", "T").equals(new Asset(
            1,
            2, new Unit(2, "m"), UpAxis.X_UP, new GeographicLocation(1, 2, 3),
            null, "S", "T")));
        assertTrue(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", null, "T").equals(new Asset(
            1,
            2, new Unit(2, "m"), UpAxis.X_UP, new GeographicLocation(1, 2, 3),
            "R", null, "T")));
        assertTrue(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", null).equals(new Asset(
            1,
            2, new Unit(2, "m"), UpAxis.X_UP, new GeographicLocation(1, 2, 3),
            "R", "S", null)));

        final Asset asset2 = new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T");
        assertTrue(asset.equals(asset2));
        asset2.getContributors().add(new Contributor());
        assertFalse(asset.equals(asset2));
        asset2.getContributors().clear();
        assertTrue(asset.equals(asset2));
View Full Code Here

Examples of de.ailis.jollada.model.GeographicLocation

    @Test
    public void testHashCode()
    {
        final int hc1 = new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T").hashCode();
        assertEquals(hc1, new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T").hashCode());
        assertThat(hc1, not(new Asset(2, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T").hashCode()));
        assertThat(hc1, not(new Asset(1, 3, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T").hashCode()));
        assertThat(hc1, not(new Asset(1, 2, new Unit(3, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T").hashCode()));
        assertThat(hc1, not(new Asset(1, 2, new Unit(2, "m"), UpAxis.Y_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T").hashCode()));
        assertThat(hc1, not(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(2, 2, 3), "R", "S", "T").hashCode()));
        assertThat(hc1, not(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R2", "S", "T").hashCode()));
        assertThat(hc1, not(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S2", "T").hashCode()));
        assertThat(hc1, not(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T2").hashCode()));

        assertThat(hc1, not(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            null, "R", "S", "T").hashCode()));
        assertThat(hc1, not(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), null, "S", "T").hashCode()));
        assertThat(hc1, not(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", null, "T").hashCode()));
        assertThat(hc1, not(new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", null).hashCode()));
    }
View Full Code Here

Examples of de.ailis.jollada.model.GeographicLocation

    @Test
    public void testToString()
    {
        final Asset asset = new Asset(1, 2, new Unit(2, "m"), UpAxis.X_UP,
            new GeographicLocation(1, 2, 3), "R", "S", "T");
        asset.getKeywords().add("KEYWORD");
        assertEquals("Asset [contributors=[], created=1, modified=2, " +
                "geographicLocation=GeographicLocation [longitude=1.0, " +
                "latitude=2.0, altitude=3.0, altitudeMode=" +
                "RELATIVE_TO_GROUND], keywords=[KEYWORD], revision=R, " +
View Full Code Here

Examples of de.ailis.jollada.model.GeographicLocation

     */

    @Test
    public void testShortConstructor()
    {
        final GeographicLocation location = new GeographicLocation(1, 2, 3);
        assertEquals(1, location.getLongitude(), 0.0001f);
        assertEquals(2, location.getLatitude(), 0.0001f);
        assertEquals(3, location.getAltitude(), 0.0001f);
        assertEquals(AltitudeMode.RELATIVE_TO_GROUND,
            location.getAltitudeMode());
    }
View Full Code Here

Examples of de.ailis.jollada.model.GeographicLocation

     */

    @Test
    public void testFullConstructor()
    {
        final GeographicLocation location = new GeographicLocation(1, 2, 3,
            AltitudeMode.ABSOLUTE);
        assertEquals(1, location.getLongitude(), 0.0001f);
        assertEquals(2, location.getLatitude(), 0.0001f);
        assertEquals(3, location.getAltitude(), 0.0001f);
        assertEquals(AltitudeMode.ABSOLUTE,
            location.getAltitudeMode());
    }
View Full Code Here

Examples of de.ailis.jollada.model.GeographicLocation

     */

    @Test(expected = IllegalArgumentException.class)
    public void testConstructorWithNull()
    {
        new GeographicLocation(1, 2, 3, null).toString();
    }
View Full Code Here

Examples of de.ailis.jollada.model.GeographicLocation

     */

    @Test
    public void testEquals()
    {
        final GeographicLocation location1 = new GeographicLocation(1, 2, 3);
        final GeographicLocation location2 = new GeographicLocation(1, 2, 3);
        assertTrue(location1.equals(location2));
        assertTrue(location1.equals(location1));
        assertFalse(location1.equals(null));
        assertFalse(location1.equals("someOther"));
        assertFalse(location1.equals(new GeographicLocation(2, 2, 3)));
        assertFalse(location1.equals(new GeographicLocation(1, 3, 3)));
        assertFalse(location1.equals(new GeographicLocation(1, 2, 4)));
        assertFalse(location1.equals(new GeographicLocation(1, 2, 3,
            AltitudeMode.ABSOLUTE)));
    }
View Full Code Here

Examples of de.ailis.jollada.model.GeographicLocation

     */

    @Test
    public void testHashCode()
    {
        final GeographicLocation unit1 = new GeographicLocation(1, 2, 3);
        final GeographicLocation unit2 = new GeographicLocation(1, 2, 3);
        final GeographicLocation unit3 = new GeographicLocation(2, 3, 4);
        final GeographicLocation unit4 = new GeographicLocation(1, 2, 3,
            AltitudeMode.ABSOLUTE);
        assertThat(unit1.hashCode(), is(unit2.hashCode()));
        assertThat(unit1.hashCode(), not(unit3.hashCode()));
        assertThat(unit1.hashCode(), not(unit4.hashCode()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.