|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
ps2.test.GeoPointTest
public class GeoPointTest
Unit tests for the GeoPoint class.
Constructor Summary | |
---|---|
GeoPointTest(String name)
|
Method Summary | |
---|---|
protected void |
setUp()
JUnit calls this before each testXXX method is run |
void |
testDistance01()
Test that distance 0 is handled correctly: same object |
void |
testDistance02()
Test that distance 0 is handled correctly: equal objects |
void |
testDistanceDueEast()
Test that points due east are handled correctly |
void |
testDistanceDueNorth()
Test that points due north are handled correctly |
void |
testDistanceDueNorthEast()
Test that points north east are handled correctly |
void |
testDistanceDueSouth()
Test that points due south are handled correctly |
void |
testDistanceDueSouthWest()
Test that points south west are handled correctly |
void |
testDistanceDueWest()
Test that points due west are handled correctly |
void |
testEquals1()
Test positive case: same object |
void |
testEquals2()
Test positive case: equal objects |
void |
testHashCode1()
Test positive case: same object |
void |
testHashCode2()
Test positive case: equal objects |
void |
testHeadingDueEast()
Test that points due east are handled correctly |
void |
testHeadingDueNorth()
Test that points due north are handled correctly |
void |
testHeadingDueSouth()
Test that points due south are handled correctly |
void |
testHeadingDueWest()
Test that points due west are handled correctly |
void |
testHeadingNorthEast()
Test that points north east are handled correctly |
void |
testHeadingSouthWest()
Test that points south west are handled correctly |
void |
testLegalValues1()
Tests that GeoPoints can be created with some legal latitude and longitude values that are in the greater Seattle area, and that the values it's provided are returned unchanged. |
void |
testLegalValues2()
Tests that GeoPoints can be created with some legal latitude and longitude values that are in the greater Seattle area, and that the values it's provided are returned unchanged. |
void |
testLocationToIntMethod()
Sanity check for our locationToInt() method |
void |
testNotEqualsDiff()
Test that two GeoPoints with different data do not register as equal. |
void |
testNotEqualsNull()
Test that null values are handled correctly |
void |
testNotEqualsSwapped()
Test that two GeoPoints with "swapped" latitude and longitude values (i.e., they both sum to the same value) do not register as equal. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GeoPointTest(String name)
Method Detail |
---|
public void testLocationToIntMethod()
protected void setUp()
setUp
in class TestCase
public void testLegalValues1()
public void testLegalValues2()
public void testDistance01()
public void testDistance02()
public void testDistanceDueNorth()
public void testDistanceDueSouth()
public void testDistanceDueEast()
public void testDistanceDueWest()
public void testDistanceDueNorthEast()
public void testDistanceDueSouthWest()
public void testHeadingDueNorth()
public void testHeadingDueSouth()
public void testHeadingDueEast()
public void testHeadingDueWest()
public void testHeadingNorthEast()
public void testHeadingSouthWest()
public void testEquals1()
public void testEquals2()
public void testNotEqualsNull()
public void testNotEqualsDiff()
public void testNotEqualsSwapped()
public void testHashCode1()
public void testHashCode2()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |