[20:21] static (extern: com.aussom.stdlib.ATest) extends: object
Implements various static test functions.
expect (Item, ToBe)
Expect helper function compares two items for equality.
Item is the first item to compare.ToBe is the second item to compare.A bool with true if equal and throws an exception if not.expectNotNull (Item)
Expect helper function expects value to not be null.
Item is the item to check.A bool with true if not null and throws an exception if not.expectNull (Item)
Expect helper function expects value to be null.
Item is the item to check.A bool with true if null and throws an exception if not.expectString (Item)
Expect helper function expects the provided item to be a string.
Item is the item to check.A bool with true if the item is a string and throws an exception if not.expectBool (Item)
Expect helper function expects the provided item to be a bool.
Item is the item to check.A bool with true if the item is a bool and throws an exception if not.expectInt (Item)
Expect helper function expects the provided item to be an int.
Item is the item to check.A bool with true if the item is a int and throws an exception if not.expectDouble (Item)
Expect helper function expects the provided item to be a double.
Item is the item to check.A bool with true if the item is a double and throws an exception if not.expectNumber (Item)
Expect helper function expects the provided item to be a type of number.
Item is the item to check.A bool with true if the item is a type of number and throws an exception if not.expectList (Item)
Expect helper function expects the provided item to be a list.
Item is the item to check.A bool with true if the item is a list and throws an exception if not.expectMap (Item)
Expect helper function expects the provided item to be a map.
Item is the item to check.A bool with true if the item is a map and throws an exception if not.expectObject (Item, string ClassName)
Expect helper function expects the provided item to be an object.
Item is the item to check.A bool with true if the item is an object and throws an exception if not.expectCallback (Item)
Expect helper function expects the provided item to be a callback.
Item is the item to check.A bool with true if the item is a callback and throws an exception if not.runTestsForClass (string ClassName)
Runs the unit tests for the provided class name and returns a unit test result with the results. Individual messages are logged to standard out. This function requires test.aussom.runner security manager property to be set to true to run this.
ClassName is a string with the class name to run.[129:21] static (extern: com.aussom.stdlib.ATestRunner) extends: object
loadTestFile (string TestsScriptFileName)
Loads a test file with the provided file name and path. This function also identifies and saves the test classes that can be ran.
TestScriptFileName is a string with the script file to load.this objectloadTestString (string FileNameStr, string AussomCodeString)
Loads a test file with the provided file name string contents. This function also identifies and saves the test classes that can be ran.
FileNameStr is a string with the name to give to the code provided. This will be the file name the code is attached to. This can be a made up name, it just can't be the same as other loaded file names.AussomCodeString is a string with the code to load.this objectgetTestClasses ()
Gets a list of test classes that have been loaded.
A list of test class names that have been loaded.getTestFunctions (string TestClassName)
Gets a list of test functions for the provided class name.
TestClassName is a string with the test class to use.A list of test function names that have been loaded.hasBefore (string TestClassName)
Checks to see if the @Before function is set.
TestClassName is a string with the test class to use.A bool with true for set and false for not.hasAfter (string TestClassName)
Checks to see if the @After function is set.
TestClassName is a string with the test class to use.A bool with true for set and false for not.runBefore (string TestClassName)
Runs the @Before function.
TestClassName is a string with the test class to use.this objectrunAfter (string TestClassName)
Runs the @After function.
TestClassName is a string with the test class to use.this objectrunTest (string TestClassName, string TestFunctionName)
Runs the function test with the provided function name. Note that the test must be annotated with @Test or it will fail.
TestClassName is a string with the test class to use.TestFunctionName is a string with the test function name.A bool with true for success and false for failure.clearClassObjectCache ()
Clears the class object cache. One object per class is stored and reused to maintain consisitency between class function. This function clears that cache.