Package org.astrogrid.samp.test
Class HubTester
java.lang.Object
org.astrogrid.samp.test.Tester
org.astrogrid.samp.test.HubTester
Tester for a running hub.
Attempts to test as much of the SAMP standard as possible for an existing
hub implementation.
- Since:
- 18 Jul 2008
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRandomObject
(int level, boolean ugly) Generates an object with random content for transmission using SAMP.createRandomString
(boolean ugly) Creates a new random string for transmission using SAMP.static void
Main method.void
run()
Perform a wide variety of tests on a running hub.static int
Does the work for the main method.Methods inherited from class org.astrogrid.samp.test.Tester
assertEquals, assertEquals, assertTrue, fail
-
Constructor Details
-
HubTester
Constructor.- Parameters:
profile
- hub discovery object- Throws:
IOException
-
-
Method Details
-
run
Perform a wide variety of tests on a running hub.- Throws:
IOException
-
createRandomObject
Generates an object with random content for transmission using SAMP. This may be a structure containing strings, lists and maps with any legal values as defined by the SAMP data encoding rules.- Parameters:
level
- maximum level of nesting (how deeply lists/maps may appear within other lists/maps)ugly
- if true, any legal SAMP content will be used; if false, the returned object should be reasonably human-readable if printed (toString)- Returns:
- random SAMP object
-
createRandomString
Creates a new random string for transmission using SAMP. This may have any legal content according to the SAMP data encoding rules.- Parameters:
ugly
- if true, any legal SAMP content will be used; if false, the returned object should be reasonably human-readable if printed (toString)
-
main
Main method. Tests a hub which is currently running.- Throws:
IOException
-
runMain
Does the work for the main method. Use -help flag.- Throws:
IOException
-