Class gabarito.AssertThat
Class defined in:lib/gabarito.js:430
A nice helper to use asserts in a more expressive way. It has all the methods from the gabarito.Assert.
gabarito.AssertThat
( assert, value
)
lib/gabarito.js:430
Parameters:
-
assert
<gabarito.Assert> -
value
<Mixed>
Index
Methods
hasProperty
( p, [msg]
)
lib/gabarito.js:696
Asserts that a given object has a property
Parameters:-
p
<String>The property name
-
[msg]
<String>The error message
hasSizeOf
( size, [msg]
)
lib/gabarito.js:443
Asserts that a given collection has a given number of elements
Parameters:-
size
<Number>The given size
-
[msg]
<String>The error message
hop
( p, [msg]
)
lib/gabarito.js:706
Asserts that a given object owns a property
Parameters:-
p
<String>The property name
-
[msg]
<String>The error message
isArray
( [msg]
)
lib/gabarito.js:536
Asserts that a given value is an array.
Parameters:-
[msg]
<String>The error message
isBoolean
( [msg]
)
lib/gabarito.js:545
Asserts that a given value is a boolean.
Parameters:-
[msg]
<String>The error message
isDate
( [msg]
)
lib/gabarito.js:599
Asserts that a given value is a Date instance.
Parameters:-
[msg]
<String>The error message
isEqualTo
( b
)
lib/gabarito.js:488
Asserts that both values are equal (using parts.Parts/equals method).
Parameters:-
b
<Mixed>A another value
isEqualTo
( b, equality
)
lib/gabarito.js:497
Asserts that both values are equals by using the passed equality function.
The equality function will receive both values as arguments and it must returns true if the values are considered equal.
Parameters:-
b
<Mixed>Another value
-
equality
<Function>The equality function
isEqualTo
( b, msg
)
lib/gabarito.js:511
Asserts that both values are equal (using parts.Parts/equals method).
Parameters:-
b
<Mixed>Another value
-
msg
<String>The error message
isEqualTo
( b, equality, msg
)
lib/gabarito.js:521
Asserts that both values are equals by using the passed equality function.
The equality function will receive both values as arguments and it must returns true if the values are considered equal.
Parameters:-
b
<Mixed>Another value
-
equality
<Function>The equality function
-
msg
<String>The error message
isFalse
( [msg]
)
lib/gabarito.js:618
Asserts that a given value is false.
Parameters:-
[msg]
<String>The error message
isFunction
( [msg]
)
lib/gabarito.js:554
Asserts that a given value is a function.
Parameters:-
[msg]
<String>The error message
isInstanceOf
( t, [msg]
)
lib/gabarito.js:608
Asserts that a given value is an instance of a given type.
Parameters:-
t
<Function>The type
-
[msg]
<String>The error message
isNaN
( [msg]
)
lib/gabarito.js:636
Asserts that a given value is NaN.
Note that the value should be the actual NaN and not something that converts to NaN.
Parameters:-
[msg]
<String>The error message
isNotNaN
( [msg]
)
lib/gabarito.js:648
Asserts that a given value is not NaN.
Note that the value should be the actual NaN and not something that converts to NaN.
Parameters:-
[msg]
<String>The error message
isNotNull
( [msg]
)
lib/gabarito.js:669
Asserts that a given value is not null.
Parameters:-
[msg]
<String>The error message
isNotUndefined
( [msg]
)
lib/gabarito.js:687
Asserts that a given value is undefined.
Parameters:-
[msg]
<String>The error message
isNull
( [msg]
)
lib/gabarito.js:660
Asserts that a given value is null.
Parameters:-
[msg]
<String>The error message
isNumber
( [msg]
)
lib/gabarito.js:563
Asserts that a given value is a number and is not NaN.
Parameters:-
[msg]
<String>The error message
isObject
( [msg]
)
lib/gabarito.js:572
Asserts that a given value is an object.
Parameters:-
[msg]
<String>The error message
isRegExp
( [msg]
)
lib/gabarito.js:590
Asserts that a given value is a RegExp instance.
Parameters:-
[msg]
<String>The error message
isString
( [msg]
)
lib/gabarito.js:581
Asserts that a given value is a string.
Parameters:-
[msg]
<String>The error message
isTrue
( [msg]
)
lib/gabarito.js:627
Asserts that a given value is true.
Parameters:-
[msg]
<String>The error message
isUndefined
( [msg]
)
lib/gabarito.js:678
Asserts that a given value is undefined.
Parameters:-
[msg]
<String>The error message