public final void testConstructor() { final WorldLocation v1 = new WorldLocation(12.225, 12.275, 12.5); final WorldLocation v2 = new WorldLocation(12, 13.5, 0, 'N', 12, 16.5, 0, 'E', 12.5); final WorldLocation v3 = new WorldLocation(12, 13, 30, 'N', 12, 16, 30, 'E', 12.5); final WorldLocation v4 = new WorldLocation(w5); assertTrue("v1 (d,d,d)", v1.equals(w5)); assertTrue("v2 (i,d,c,i,d,c,d)", v2.equals(w5)); assertTrue("v3 (i,i,d,c,i,i,d,c,d)", v3.equals(w5)); assertTrue("v4 (WorldLoc)", v4.equals(w5)); }
public final void setXXX() { final double dep = w4.getDepth(); final double dLat = w4.getLat(); final double dLong = w4.getLong(); w1.setDepth(dep); w1.setLat(dLat); w1.setLong(dLong); assertTrue(w1.equals(w4)); }
public final void testAddToMe() { w1.addToMe(wv1); assertTrue(w1.equals(w4)); }
public final void testAdd() { final WorldLocation ww = w1.add(wv1); assertTrue(w4.equals(ww)); }
public final void testCopy() { final WorldLocation w3 = new WorldLocation(0, 0, 0); w3.copy(w2); assertTrue(w2.equals(w3)); }
public final void testEquals() { assertTrue(w1.equals(w2)); assertTrue(!w1.equals(w5)); }