Packageflexunit.framework
Classpublic class Assert
SubclassesTestCase

Base class containing static assert methods.



Public Properties
 PropertyDefined by
  assetionsMade : Number
[static][read-only]
Assert
  maxAssertionsMade : Number
[static][read-only]
Assert
  totalAssertionsMade : Number
[static][read-only]
Assert
Protected Properties
 PropertyDefined by
  _assertionsMade : Number = 0
[static]
Assert
Public Methods
 MethodDefined by
  
Assert
  
assertContained(... rest):void
[static] Asserts that the first string is contained in the second one The first argument can be the message when the assertion fails
Assert
  
assertEquals(... rest):void
[static] Asserts that 2 values are equal.
Assert
  
assertFalse(... rest):void
[static] Asserts that a condition is false The first argument can be the message when the assertion fails
Assert
  
assertMatch(... rest):void
[static] Asserts that a string matches a regexp.
Assert
  
assertNoMatch(... rest):void
[static] Asserts that a string doesn't match a regexp.
Assert
  
assertNotContained(... rest):void
[static] Asserts that the first string is not contained in the second one The first argument can be the message when the assertion fails
Assert
  
assertNotNull(... rest):void
[static] Asserts that an object is not null The first argument can be the message when the assertion fails
Assert
  
assertNotUndefined(... rest):void
[static] Asserts that an object is not undefined The first argument can be the message when the assertion fails
Assert
  
assertNull(... rest):void
[static] Asserts that an object is null The first argument can be the message when the assertion fails
Assert
  
assertStrictlyEquals(... rest):void
[static] Asserts that two objects are strickly identical The first argument can be the message when the assertion fails
Assert
  
assertTrue(... rest):void
[static] Asserts that a condition is true The first argument can be the message when the assertion fails
Assert
  
assertUndefined(... rest):void
[static] Asserts that an object is undefined The first argument can be the message when the assertion fails
Assert
  
fail(failMessage:String = ""):void
[static] Fails with the given message
Assert
  
[static]
Assert
  
[static]
Assert
  
[static]
Assert
Property detail
_assertionsMadeproperty
protected static var _assertionsMade:Number = 0
assetionsMadeproperty 
assetionsMade:Number  [read-only]Implementation
    public static function get assetionsMade():Number
maxAssertionsMadeproperty 
maxAssertionsMade:Number  [read-only]Implementation
    public static function get maxAssertionsMade():Number
totalAssertionsMadeproperty 
totalAssertionsMade:Number  [read-only]Implementation
    public static function get totalAssertionsMade():Number
Constructor detail
Assert()constructor
public function Assert()
Method detail
assertContained()method
public static function assertContained(... rest):void

Asserts that the first string is contained in the second one The first argument can be the message when the assertion fails

Parameters
... rest — [ message = "", shortString, longString ]
assertEquals()method 
public static function assertEquals(... rest):void

Asserts that 2 values are equal. The first argument can be the message when the assertion fails

Parameters
... rest — [ message = "", expected, actual ]
assertFalse()method 
public static function assertFalse(... rest):void

Asserts that a condition is false The first argument can be the message when the assertion fails

Parameters
... rest — [ message = "", condition ]
assertMatch()method 
public static function assertMatch(... rest):void

Asserts that a string matches a regexp. The first argument can be the message when the assertion fails

Parameters
... rest — [ message = "", regexp, stringToTest ]
assertNoMatch()method 
public static function assertNoMatch(... rest):void

Asserts that a string doesn't match a regexp. The first argument can be the message when the assertion fails

Parameters
... rest — [ message = "", regexp, stringToTest ]
assertNotContained()method 
public static function assertNotContained(... rest):void

Asserts that the first string is not contained in the second one The first argument can be the message when the assertion fails

Parameters
... rest — [ message = "", shortString, longString ]
assertNotNull()method 
public static function assertNotNull(... rest):void

Asserts that an object is not null The first argument can be the message when the assertion fails

Parameters
... rest — [ message = "", objectToTest ]
assertNotUndefined()method 
public static function assertNotUndefined(... rest):void

Asserts that an object is not undefined The first argument can be the message when the assertion fails

Parameters
... rest — [ message = "", objectToTest ]
assertNull()method 
public static function assertNull(... rest):void

Asserts that an object is null The first argument can be the message when the assertion fails

Parameters
... rest — [ message = "", objectToTest ]
assertStrictlyEquals()method 
public static function assertStrictlyEquals(... rest):void

Asserts that two objects are strickly identical The first argument can be the message when the assertion fails

Parameters
... rest — [ message = "", expectedObject, actualObject ]
assertTrue()method 
public static function assertTrue(... rest):void

Asserts that a condition is true The first argument can be the message when the assertion fails

Parameters
... rest — [ message = "", condition ]
assertUndefined()method 
public static function assertUndefined(... rest):void

Asserts that an object is undefined The first argument can be the message when the assertion fails

Parameters
... rest — [ message = "", objectToTest ]
fail()method 
public static function fail(failMessage:String = ""):void

Fails with the given message

Parameters
failMessage:String (default = "")
oneAssertionHasBeenMade()method 
public static function oneAssertionHasBeenMade():void
resetAssertionsMade()method 
public static function resetAssertionsMade():void
resetEveryAsserionsFields()method 
public static function resetEveryAsserionsFields():void