JsUnit

jsUnitCore.js

Summary

jsUnitCore.js contains the implementation of the core JsUnit functionality: assertions, JsUnitTestSuites, and JsUnitException. An HTML page is considered to be a JsUnit Test Page if it "includes" jsUnitCore.js, i.e. the following line is present: <script type="text/javascript" src="/path/to/jsUnitCore.js"></script>

Author: Edward Hieatt, edward@jsunit.net, http://www.jsunit.net


Class Summary
JsUnitAssertionArgumentError A JsUnitAssertionArgumentError represents an invalid call to an assertion function - either an invalid argument type or an incorrect number of arguments
JsUnitError A JsUnitError represents an error (an exception or a call to error()) during the execution of a Test Function
JsUnitFailure A JsUnitFailure represents an assertion failure (or a call to fail()) during the execution of a Test Function
JsUnitTestSuite A JsUnitTestSuite represents a suite of JsUnit Test Pages.
Utilities  

Method Summary
static void assert()
           Checks that the given boolean value is true.
static void assertArrayEquals()
           Checks that an array is equal to another by checking that both are arrays and then comparing their elements using assertObjectEquals
static void assertArrayEqualsIgnoringOrder()
           Checks that two arrays have the same contents, ignoring the order of the contents
static void assertContains()
           Checks that a collection contains a value by checking that collection.indexOf(value) is not -1
static void assertEquals()
           Checks that two values are equal (using ===)
static void assertEqualsIgnoringOrder()
           Synonym for assertArrayEqualsIgnoringOrder
static void assertEvaluatesToFalse()
           Checks that a value evaluates to false in the sense that value == false
static void assertEvaluatesToTrue()
           Checks that a value evaluates to true in the sense that value == true
static void assertFalse()
           Checks that a boolean value is false.
static void assertHashEquals()
           Checks that a hash is has the same contents as another by iterating over the expected hash and checking that each key's value is present in the actual hash and calling assertEquals on the two values, and then checking that there is no key in the actual hash that isn't present in the expected hash.
static void assertHTMLEquals()
           Checks that a value is the same as an HTML string by "standardizing" both and comparing the result for equality.
static void assertNaN()
           Checks that a value is NaN (Not a Number)
static void assertNotEquals()
           Checks that two values are not equal (using !==)
static void assertNotNaN()
           Checks that a value is not NaN (i.e.
static void assertNotNull()
           Checks that a value is not null
static void assertNotUndefined()
           Checks that a value is not undefined
static void assertNull()
           Checks that a value is null
static void assertObjectEquals()
           Checks that an object is equal to another using === for primitives and their object counterparts but also desceding into collections and calling assertObjectEquals for each element
static void assertRoughlyEquals()
           Checks that two value are within a tolerance of one another
static void assertTrue()
           Synonym for assertTrue
static void assertUndefined()
           Checks that a value is undefined
static void debug()
          
static void error(errorMessage)
           Causes an error
static void fail(failureMessage)
           Causes a failure
static void info()
          
static void inform()
          
static Object isLoaded()
          
static Object jsUnitGetParm(name)
          
static void jsUnitSetOnLoad(windowRef, onloadHandler)
          
static void newOnLoadEvent()
          
static void setJsUnitTracer(aJsUnitTracer)
          
static void warn()
          

JsUnit


www.jsunit.net
Documentation generated by JSDoc on Sun Sep 9 15:34:58 2007