Packagemvcexpress.utils
Classpublic class AssertExpress
InheritanceAssertExpress Inheritance Object

Class to assert statements for testing. (Similar to FlexUnit)



Public Properties
 PropertyDefined By
  errorHandler : Function
[static] Function to handle assert errors.
AssertExpress
Public Methods
 MethodDefined By
  
equals(actual:Object, expected:Object, customMessage:String):void
[static] Asserts that two provided values are equal.
AssertExpress
  
fail(customMessage:String):void
[static] Fails a test with the argument message.
AssertExpress
  
isFalse(condition:Boolean, customMessage:String):void
[static] Asserts that a condition is false.
AssertExpress
  
isNotNull(actual:Object, customMessage:String):void
[static] Asserts that object is not null.
AssertExpress
  
isNull(actual:Object, customMessage:String):void
[static] Asserts that object is null.
AssertExpress
  
isTrue(condition:Boolean, customMessage:String):void
[static] Asserts that a condition is true.
AssertExpress
  
strictlyEquals(actual:Object, expected:Object, customMessage:String):void
[static] Asserts that the provided values are strictly equal.
AssertExpress
Property Detail
errorHandlerproperty
public static var errorHandler:Function

Function to handle assert errors. Handling function must expect will get 2 parameters as String, customMessage and errorMessage. By default it set to function that throws Error's.

Method Detail
equals()method
public static function equals(actual:Object, expected:Object, customMessage:String):void

Asserts that two provided values are equal.

Parameters

actual:Object — value under test.
 
expected:Object — expected value.
 
customMessage:String — optional error message.

fail()method 
public static function fail(customMessage:String):void

Fails a test with the argument message.

Parameters

customMessage:String — optional error message.

isFalse()method 
public static function isFalse(condition:Boolean, customMessage:String):void

Asserts that a condition is false.

Parameters

condition:Boolean — value under test.
 
customMessage:String — optional error message.

isNotNull()method 
public static function isNotNull(actual:Object, customMessage:String):void

Asserts that object is not null.

Parameters

actual:Object — value under test.
 
customMessage:String — optional error message.

isNull()method 
public static function isNull(actual:Object, customMessage:String):void

Asserts that object is null.

Parameters

actual:Object — value under test.
 
customMessage:String — optional error message.

isTrue()method 
public static function isTrue(condition:Boolean, customMessage:String):void

Asserts that a condition is true.

Parameters

condition:Boolean — value under test.
 
customMessage:String — optional error message.

strictlyEquals()method 
public static function strictlyEquals(actual:Object, expected:Object, customMessage:String):void

Asserts that the provided values are strictly equal.

Parameters

actual:Object — value under test.
 
expected:Object — expected value.
 
customMessage:String — optional error message.