static
Class Assert
protected
static
String
_formatMessage
(
customMessage
,
defaultMessage
)
customMessage
<String>
The message passed in by the developer.
defaultMessage
<String>
The message created by the error by default.
String
protected
static
void
_getCount
(
)
protected
static
void
_increment
(
)
protected
static
void
_reset
(
)
static
void
areEqual
(
expected
,
actual
,
message
)
expected
<Object>
The expected value.
actual
<Object>
The actual value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
areNotEqual
(
unexpected
,
actual
,
message
)
unexpected
<Object>
The unexpected value.
actual
<Object>
The actual value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
areNotSame
(
unexpected
,
actual
,
message
)
unexpected
<Object>
The unexpected value.
actual
<Object>
The actual value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
areSame
(
expected
,
actual
,
message
)
expected
<Object>
The expected value.
actual
<Object>
The actual value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
fail
(
message
)
message
<String>
(Optional) The message to display with the failure.
static
void
isArray
(
actual
,
message
)
actual
<Object>
The value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isBoolean
(
actual
,
message
)
actual
<Object>
The value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isFalse
(
actual
,
message
)
actual
<Object>
The actual value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isFunction
(
actual
,
message
)
actual
<Object>
The value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isInstanceOf
(
expected
,
actual
,
message
)
expected
<Function>
The function that the object should be an instance of.
actual
<Object>
The object to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isNaN
(
actual
,
message
)
actual
<Object>
The value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isNotNaN
(
actual
,
message
)
actual
<Object>
The value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isNotNull
(
actual
,
message
)
actual
<Object>
The actual value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isNotUndefined
(
actual
,
message
)
actual
<Object>
The actual value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isNull
(
actual
,
message
)
actual
<Object>
The actual value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isNumber
(
actual
,
message
)
actual
<Object>
The value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isObject
(
actual
,
message
)
actual
<Object>
The value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isString
(
actual
,
message
)
actual
<Object>
The value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isTrue
(
actual
,
message
)
actual
<Object>
The actual value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isTypeOf
(
expectedType
,
actualValue
,
message
)
expectedType
<String>
The expected type of the variable.
actualValue
<Object>
The actual value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
isUndefined
(
actual
,
message
)
actual
<Object>
The actual value to test.
message
<String>
(Optional) The message to display if the assertion fails.
static
void
Y.assert
(
condition
,
message
)
condition
<Boolean>
The condition to test.
message
<String>
The message to display if the assertion fails.
static
void
Y.fail
(
message
)
message
<String>
(Optional) The message to display with the failure.