|
JsUnit | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--GLOBALS
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
|
clearInterval(timeoutKey)
Mocks out clearInterval by clearing Clock's scheduledFunction for the given ID |
<static> void
|
clearTimeout(timeoutKey)
Mocks out clearTimeout by clearing Clock's scheduledFunction for the given ID |
<static> Object
|
createXmlHttpRequest()
Useful for testing. |
<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> Object
|
setInterval(funcToCall, millis)
Mocks out setInterval by registering the callback with Clock |
<static> void
|
setJsUnitTracer(aJsUnitTracer)
|
<static> Object
|
setTimeout(funcToCall, millis)
Mocks out setTimeout by registering the callback with Clock |
<static> void
|
warn()
|
Method Detail |
<static> void assert()
comment
- optional, displayed in the case of failure
<static> void assertArrayEquals()
comment
- optional, displayed in the case of failure
value
- the expected array
value
- the actual array
<static> void assertArrayEqualsIgnoringOrder()
comment
- optional, displayed in the case of failure
array1
- first array
array2
- second array
<static> void assertContains()
comment
- optional, displayed in the case of failure
collection
- the collection
value
- the value
<static> void assertEquals()
comment
- optional, displayed in the case of failure
expected
- the expected value
actual
- the actual value
<static> void assertEqualsIgnoringOrder()
<static> void assertEvaluatesToFalse()
comment
- optional, displayed in the case of failure
value
- the value
<static> void assertEvaluatesToTrue()
comment
- optional, displayed in the case of failure
value
- the value
<static> void assertFalse()
comment
- optional, displayed in the case of failure
<static> void assertHashEquals()
comment
- optional, displayed in the case of failure
value
- the expected hash
value
- the actual hash
<static> void assertHTMLEquals()
comment
- optional, displayed in the case of failure
value1
- the expected HTML string
value2
- the actual HTML string
<static> void assertNaN()
comment
- optional, displayed in the case of failure
value
- the value
<static> void assertNotEquals()
comment
- optional, displayed in the case of failure
value1
- a value
value2
- another value
<static> void assertNotNaN()
comment
- optional, displayed in the case of failure
value
- the value
<static> void assertNotNull()
comment
- optional, displayed in the case of failure
value
- the value
<static> void assertNotUndefined()
comment
- optional, displayed in the case of failure
value
- the value
<static> void assertNull()
comment
- optional, displayed in the case of failure
value
- the value
<static> void assertObjectEquals()
comment
- optional, displayed in the case of failure
value
- the expected value
value
- the actual value
<static> void assertRoughlyEquals()
comment
- optional, displayed in the case of failure
value1
- a value
value1
- another value
tolerance
- the tolerance
<static> void assertTrue()
<static> void assertUndefined()
comment
- optional, displayed in the case of failure
value
- the value
<static> void clearInterval(timeoutKey)
<static> void clearTimeout(timeoutKey)
<static> Object createXmlHttpRequest()
<static> void debug()
<static> void error(errorMessage)
errorMessage
- the message for the error
<static> void fail(failureMessage)
failureMessage
- the message for the failure
<static> void info()
<static> void inform()
<static> Object isLoaded()
<static> Object jsUnitGetParm(name)
<static> void jsUnitSetOnLoad(windowRef, onloadHandler)
<static> void newOnLoadEvent()
<static> Object setInterval(funcToCall, millis)
funcToCall
-
millis
-
<static> void setJsUnitTracer(aJsUnitTracer)
<static> Object setTimeout(funcToCall, millis)
funcToCall
-
millis
-
<static> void warn()
|
JsUnit | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |