API: yuitest YAHOO.util.ObjectAssert (YUI Library)

# Yahoo! UI Library

### yuitest 2.8.1

Yahoo! UI Library > yuitest > YAHOO.util.ObjectAssert
Search:
Filters Show Private Show Protected Show Deprecated

## `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.

#### 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.

Copyright © 2010 Yahoo! Inc. All rights reserved.