|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.hd.d.pg2k.test.dev.LocationTest
public final class LocationTest
Test of various aspects of Location and GeoUtils, etc. This includes geographical lookup by client IP address, though maybe these should be moved to a separate GeoUtilsTests class.
TODO: test that exhibits correctly get specific/generic flag depending on details being with exhibit or looked up in generic map
| Field Summary | |
|---|---|
private static java.util.Random |
rnd
Private source of OK pseudo-random numbers. |
| Constructor Summary | |
|---|---|
LocationTest(java.lang.String name)
|
|
| Method Summary | |
|---|---|
static void |
testAddrPrefix()
Test AddrPrefix class briefly. |
static void |
testAddrPrefixHashCode()
Check AddrPrefix.hashCode() effectiveness, as this may be important for performance. |
static void |
testAddrPrefixParsing()
Test some simple cases for AddrPrefix dotted-quad parsing. |
static void |
testDNSLookup()
Check DNS lookup. |
static void |
testGeoProximity()
Test that we can use the geographical-proximity-by-ccTLD data. |
static void |
testLocationEstdContains()
Tests use of contains() and related operations on Location.Estd. |
void |
testLocationLookup()
Test that we can look up exhibits by name in the sample auxInfo file. |
static void |
testLocationMapBasics()
Basic tests of LocationMap behaviour. |
static void |
testRegionLookup()
Check lookup of geographic location of IP address. |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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 |
| Field Detail |
|---|
private static final java.util.Random rnd
| Constructor Detail |
|---|
public LocationTest(java.lang.String name)
| Method Detail |
|---|
public static void testLocationMapBasics()
public static void testLocationEstdContains()
throws java.lang.Exception
java.lang.Exception
public void testLocationLookup()
throws java.lang.Exception
We skip these tests if we do not have full/normal access to the filesystem.
java.lang.Exceptionpublic static void testGeoProximity()
public static void testRegionLookup()
throws java.lang.Exception
TODO: whitebox check that mappings in source data are actually visible.
java.lang.Exceptionpublic static void testDNSLookup()
public static void testAddrPrefix()
public static void testAddrPrefixParsing()
public static void testAddrPrefixHashCode()
The aim is to ensure that there are not excessive collisions for real data values, as that would make HashSet and related containers behave badly.
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||