Yahoo! UI Library

yuitest  2.8.0r4

Yahoo! UI Library > yuitest > YAHOO.util.ObjectAssert
Search:
 
Filters

static Class YAHOO.util.ObjectAssert

The ObjectAssert object provides functions to test JavaScript objects for a variety of cases.

Methods

hasProperty

static void hasProperty ( propertyName , object , message )
Asserts that an object has a property with the given name.
Parameters:
propertyName <String> The name of the property to test.
object <Object> The object to search.
message <String> (Optional) The message to display if the assertion fails.
Returns: void

propertiesAreEqual

static void propertiesAreEqual ( expected , actual , message )
Asserts that all properties in the object exist in another object.
Parameters:
expected <Object> An object with the expected properties.
actual <Object> An object with the actual properties.
message <String> (Optional) The message to display if the assertion fails.
Returns: void


Copyright © 2009 Yahoo! Inc. All rights reserved.