| Package | org.springextensions.actionscript.utils |
| Class | public class Assert |
| Method | Defined by | ||
|---|---|---|---|
|
arrayContains(array:Array, item:String, message:*):void
[static]
Assert that the array contains the passed in item.
| Assert | ||
|
dictionaryKeysOfType(dictionary:Dictionary, type:Class, message:String = ""):void
[static]
Assert that the given Dictionary contains only keys of the given type.
| Assert | ||
|
hasText(string:String, message:String = ""):void
[static]
Assert that the given String has valid text content; that is, it must not
be
null and must contain at least one non-whitespace character. | Assert | ||
|
implementationOf(object:*, interfaze:Class, message:String = ""):void
[static]
Assert that an object implements a certain interface.
| Assert | ||
|
instanceOf(object:*, type:Class, message:String = ""):void
[static]
Assert that an object is an instance of a certain type..
| Assert | ||
|
isTrue(expression:Boolean, message:String = ""):void
[static]
Asserts a boolean expression to be
true. | Assert | ||
|
notNull(object:Object, message:String = ""):void
[static]
Assert that an object is
null. | Assert | ||
|
state(expression:Boolean, message:String = ""):void
[static]
Assert a boolean expression to be true.
| Assert | ||
|
subclassOf(clazz:Class, parentClass:Class, message:String = ""):void
[static]
Asserts that a class is a subclass of another class.
| Assert | ||
| arrayContains | () | method |
public static function arrayContains(array:Array, item:String, message:*):voidAssert that the array contains the passed in item.
Parametersarray:Array |
|
item:String |
|
message:* |
| dictionaryKeysOfType | () | method |
public static function dictionaryKeysOfType(dictionary:Dictionary, type:Class, message:String = ""):voidAssert that the given Dictionary contains only keys of the given type.
Parametersdictionary:Dictionary |
|
type:Class |
|
message:String (default = "") |
| hasText | () | method |
public static function hasText(string:String, message:String = ""):void
Assert that the given String has valid text content; that is, it must not
be null and must contain at least one non-whitespace character.
string:String — the String to check
|
|
message:String (default = "") — the exception message to use if the assertion fails
|
See also
| implementationOf | () | method |
public static function implementationOf(object:*, interfaze:Class, message:String = ""):voidAssert that an object implements a certain interface.
Parametersobject:* |
|
interfaze:Class |
|
message:String (default = "") |
| instanceOf | () | method |
public static function instanceOf(object:*, type:Class, message:String = ""):voidAssert that an object is an instance of a certain type..
Assert.instanceOf(value, type, "The value must be an instance of 'type'");Parameters
object:* — the object to check
|
|
type:Class — the error message to use if the assertion fails
|
|
message:String (default = "") |
IllegalArgumentError — if the object is not an instance of the given type
|
| isTrue | () | method |
public static function isTrue(expression:Boolean, message:String = ""):void
Asserts a boolean expression to be true.
Assert.isTrue(value, "The expression must be true");Parameters
expression:Boolean — a boolean expression
|
|
message:String (default = "") — the error message to use if the assertion fails
|
IllegalArgumentError — if the expression is not true
|
| notNull | () | method |
public static function notNull(object:Object, message:String = ""):void
Assert that an object is null.
Assert.isNull(value, "The value must be null");Parameters
object:Object — the object to check
|
|
message:String (default = "") — the error message to use if the assertion fails
|
IllegalArgumentError — if the object is not null
|
| state | () | method |
public static function state(expression:Boolean, message:String = ""):voidAssert a boolean expression to be true. If false, an IllegalStateError is thrown.
Parametersexpression:Boolean — a boolean expression
|
|
message:String (default = "") — error message if the assertion fails
|
| subclassOf | () | method |
public static function subclassOf(clazz:Class, parentClass:Class, message:String = ""):voidAsserts that a class is a subclass of another class.
Parametersclazz:Class |
|
parentClass:Class |
|
message:String (default = "") |