diff -r 322d0feea350 -r 89ef5ed3c48b src/cm/media/js/lib/yui/yui_3.10.3/api/classes/Test.ObjectAssert.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/media/js/lib/yui/yui_3.10.3/api/classes/Test.ObjectAssert.html Tue Jul 16 14:29:46 2013 +0200 @@ -0,0 +1,3021 @@ + + + + + Test.ObjectAssert - YUI 3 + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 3.10.3 +
+
+
+ +
+ +
+
+
+ Show: + + + + + + + +
+ + +
+
+
+

Test.ObjectAssert Class

+
+ + + + + +
+ Defined in: test/js/ObjectAssert.js:2 +
+ + + + + Module: test + + + + +
+ + + +
+

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

+
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

areEqual

+ + +
+ (
    + +
  • + + expected + +
  • + +
  • + + actual + +
  • + +
  • + + message + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + test/js/ObjectAssert.js:12 + +

+ + + + + +
+ +
+

Asserts that an object has all of the same properties +and property values as the other.

+
+ + +
+

Parameters:

+ +
    + +
  • + + expected + Object + + + + +
    +

    The object with all expected properties and values.

    +
    + + +
  • + +
  • + + actual + Object + + + + +
    +

    The object to inspect.

    +
    + + +
  • + +
  • + + message + String + + + + +
    +

    (Optional) The message to display if the assertion fails.

    +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hasKey

+ + +
+ (
    + +
  • + + propertyName + +
  • + +
  • + + object + +
  • + +
  • + + message + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + test/js/ObjectAssert.js:43 + +

+ + + +

Deprecated: Use ownsOrInheritsKey() instead

+ + + +
+ +
+

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.

    +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hasKeys

+ + +
+ (
    + +
  • + + properties + +
  • + +
  • + + object + +
  • + +
  • + + message + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + test/js/ObjectAssert.js:56 + +

+ + + +

Deprecated: Use ownsOrInheritsKeys() instead

+ + + +
+ +
+

Asserts that an object has all properties of a reference object.

+
+ + +
+

Parameters:

+ +
    + +
  • + + properties + Array + + + + +
    +

    An array of property names that should be on the object.

    +
    + + +
  • + +
  • + + object + Object + + + + +
    +

    The object to search.

    +
    + + +
  • + +
  • + + message + String + + + + +
    +

    (Optional) The message to display if the assertion fails.

    +
    + + +
  • + +
+
+ + + + + +
+ + +
+

inheritsKey

+ + +
+ (
    + +
  • + + propertyName + +
  • + +
  • + + object + +
  • + +
  • + + message + +
  • + +
) +
+ + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + test/js/ObjectAssert.js:69 + +

+ + + + + +
+ +
+

Asserts that a property with the given name exists on an object's prototype.

+
+ + +
+

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.

    +
    + + +
  • + +
+
+ + + + + +
+ + +
+

inheritsKeys

+ + +
+ (
    + +
  • + + properties + +
  • + +
  • + + object + +
  • + +
  • + + message + +
  • + +
) +
+ + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + test/js/ObjectAssert.js:84 + +

+ + + + + +
+ +
+

Asserts that all properties exist on an object prototype.

+
+ + +
+

Parameters:

+ +
    + +
  • + + properties + Array + + + + +
    +

    An array of property names that should be on the object.

    +
    + + +
  • + +
  • + + object + Object + + + + +
    +

    The object to search.

    +
    + + +
  • + +
  • + + message + String + + + + +
    +

    (Optional) The message to display if the assertion fails.

    +
    + + +
  • + +
+
+ + + + + +
+ + +
+

ownsKey

+ + +
+ (
    + +
  • + + propertyName + +
  • + +
  • + + object + +
  • + +
  • + + message + +
  • + +
) +
+ + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + test/js/ObjectAssert.js:101 + +

+ + + + + +
+ +
+

Asserts that a property with the given name exists on an object instance (not on its prototype).

+
+ + +
+

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.

    +
    + + +
  • + +
+
+ + + + + +
+ + +
+

ownsKeys

+ + +
+ (
    + +
  • + + properties + +
  • + +
  • + + object + +
  • + +
  • + + message + +
  • + +
) +
+ + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + test/js/ObjectAssert.js:116 + +

+ + + + + +
+ +
+

Asserts that all properties exist on an object instance (not on its prototype).

+
+ + +
+

Parameters:

+ +
    + +
  • + + properties + Array + + + + +
    +

    An array of property names that should be on the object.

    +
    + + +
  • + +
  • + + object + Object + + + + +
    +

    The object to search.

    +
    + + +
  • + +
  • + + message + String + + + + +
    +

    (Optional) The message to display if the assertion fails.

    +
    + + +
  • + +
+
+ + + + + +
+ + +
+

ownsNoKeys

+ + +
+ (
    + +
  • + + object + +
  • + +
  • + + message + +
  • + +
) +
+ + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + test/js/ObjectAssert.js:133 + +

+ + + + + +
+ +
+

Asserts that an object owns no properties.

+
+ + +
+

Parameters:

+ +
    + +
  • + + object + Object + + + + +
    +

    The object to check.

    +
    + + +
  • + +
  • + + message + String + + + + +
    +

    (Optional) The message to display if the assertion fails.

    +
    + + +
  • + +
+
+ + + + + +
+ + +
+

ownsOrInheritsKey

+ + +
+ (
    + +
  • + + propertyName + +
  • + +
  • + + object + +
  • + +
  • + + message + +
  • + +
) +
+ + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + test/js/ObjectAssert.js:156 + +

+ + + + + +
+ +
+

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.

    +
    + + +
  • + +
+
+ + + + + +
+ + +
+

ownsOrInheritsKeys

+ + +
+ (
    + +
  • + + properties + +
  • + +
  • + + object + +
  • + +
  • + + message + +
  • + +
) +
+ + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + test/js/ObjectAssert.js:171 + +

+ + + + + +
+ +
+

Asserts that an object has all properties of a reference object.

+
+ + +
+

Parameters:

+ +
    + +
  • + + properties + Array + + + + +
    +

    An array of property names that should be on the object.

    +
    + + +
  • + +
  • + + object + Object + + + + +
    +

    The object to search.

    +
    + + +
  • + +
  • + + message + String + + + + +
    +

    (Optional) The message to display if the assertion fails.

    +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + +