Yahoo! UI Library

test  3.0.0

Yahoo! UI Library > test > Assert.Error
Search:
 
Filters

Class Assert.Error

Known Subclasses:
Assert.ShouldError Assert.UnexpectedError Assert.UnexpectedValue Assert.ShouldFail Assert.ComparisonFailure
Error is thrown whenever an assertion fails. It provides methods to more easily get at error information and also provides a base class from which more specific assertion errors can be derived.

Constructor

Assert.Error ( message )
Parameters:
message <String> The message to display when the error occurs.

Properties

name - String

The name of the error that occurred.

Methods

getMessage

String getMessage ( )
Returns a fully formatted error for an assertion failure. This should be overridden by all subclasses to provide specific information.
Returns: String
A string describing the error.

toString

String toString ( )
Returns a string representation of the error.
Returns: String
A string representation of the error.

valueOf

String valueOf ( )
Returns a primitive value version of the error. Same as toString().
Returns: String
A primitive value version of the error.


Copyright © 2009 Yahoo! Inc. All rights reserved.