Sydney

Class Assert

Object
   |
   +--Assert
Direct Known Subclasses:
Test

class Assert

Defined in assert.js


Field Summary
 var Expected
          
 var actual
          
 
Constructor Summary
Assert ()
           
 
Method Summary
 void assertArraysEqual(<Array> expected, <Array> actual, <string> msg)
           Asserts that two arrays contain equal objects in the same order.
 void assertArraysIdentical(<Array> expected, <Array> actual, <string> msg)
           Asserts that two arrays contain identical objects in the same order.
 void assertDefined(<Object> object, <string> msg)
           Checks to see if object is something other than undefined and throws an AssertionFailedError if not.
 void assertEqual(<Object> expected, <Object> actual, <string> msg)
           Checks to see if expected and actual are equal.
 void assertFalse(<boolean> condition, <string> msg)
           Checks to see if condition is false and calls fail() if not.
 void assertIdentical(<Object> expected, <Object> actual, <string> msg)
           Checks to see if expected and actual are identical.
 void assertNotIdentical(<Object> expected, <Object> actual, <string> msg)
           Checks to see if expected and actual are identical and throws an {$link AssertionFailedError} if so.
 void assertNotNull(<Object> object, <string> msg)
           Checks to see if object is something other than null and throws an AssertionFailedError if not.
 void assertNull(<Object> object, <string> msg)
           Checks to see if object is identical to null and throws an AssertionFailedError if not.
 void assertTrue(<boolean> condition, <string> msg)
           Checks to see if condition is true and calls fail() if not.
 void assertUndefined(<Object> object, <string> msg)
           Checks to see if object is identical to undefined and throws an AssertionFailedError if not.
 void fail(<string> msg)
           Causes the running test to fail.

Field Detail

Expected

var Expected

actual

var actual

Constructor Detail

Assert

function Assert()
Method Detail

assertArraysEqual

void assertArraysEqual(<Array> expected, <Array> actual, <string> msg)

assertArraysIdentical

void assertArraysIdentical(<Array> expected, <Array> actual, <string> msg)

assertDefined

void assertDefined(<Object> object, <string> msg)

assertEqual

void assertEqual(<Object> expected, <Object> actual, <string> msg)

assertFalse

void assertFalse(<boolean> condition, <string> msg)

assertIdentical

void assertIdentical(<Object> expected, <Object> actual, <string> msg)

assertNotIdentical

void assertNotIdentical(<Object> expected, <Object> actual, <string> msg)

assertNotNull

void assertNotNull(<Object> object, <string> msg)

assertNull

void assertNull(<Object> object, <string> msg)

assertTrue

void assertTrue(<boolean> condition, <string> msg)

assertUndefined

void assertUndefined(<Object> object, <string> msg)
    Parameters:
      object - the thing that should be undefined
      msg - (Optional) - the message to display if object is not undefined. Defaults to the empty string.

fail

void fail(<string> msg)
    Causes the running test to fail. If msg is given then it will be given as the reason for the failure.
    Parameters:
      msg - (Optional) - the message to associate with the failure. Defaults to the empty string.

Sydney

SourceForge.net Logo