diff -r 322d0feea350 -r 89ef5ed3c48b src/cm/media/js/lib/yui/yui_3.10.3/api/classes/Test.Mock.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.Mock.html Tue Jul 16 14:29:46 2013 +0200 @@ -0,0 +1,1886 @@ + + + + + Test.Mock - YUI 3 + + + + + + + + +
+
+
+ +

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

Test.Mock Class

+
+ + + + + +
+ Defined in: test/js/Mock.js:1 +
+ + + + + Module: test + + + + +
+ + + +
+

Creates a new mock object.

+
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ +
    + +
  • + expect + + + static + + +
  • + +
  • + verify + + + static + + +
  • + +
+
+ + + + + + + +
+ + +
+

Methods

+ + +
+

expect

+ + +
+ (
    + +
  • + + mock + +
  • + +
  • + + expectation + +
  • + +
) +
+ + + + + Void + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + test/js/Mock.js:45 + +

+ + + + + +
+ +
+

Assigns an expectation to a mock object. This is used to create +methods and properties on the mock object that are monitored for +calls and changes, respectively.

+
+ + +
+

Parameters:

+ +
    + +
  • + + mock + Object + + + + +
    +

    The object to add the expectation to.

    +
    + + +
  • + +
  • + + expectation + Object + + + + +
    +

    An object defining the expectation. For + properties, the keys "property" and "value" are required. For a + method the "method" key defines the method's name, the optional "args" + key provides an array of argument types. The "returns" key provides + an optional return value. An optional "run" key provides a function + to be used as the method body. The return value of a mocked method is + determined first by the "returns" key, then the "run" function's return + value. If neither "returns" nor "run" is provided undefined is returned. + An optional 'error' key defines an error type to be thrown in all cases. + The "callCount" key provides an optional number of times the method is + expected to be called (the default is 1).

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

Returns:

+ +
+ + + Void: + + +
+
+ + + +
+ + +
+

verify

+ + +
+ (
    + +
  • + + mock + +
  • + +
) +
+ + + + + Void + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + test/js/Mock.js:137 + +

+ + + + + +
+ +
+

Verifies that all expectations of a mock object have been met and +throws an assertion error if not.

+
+ + +
+

Parameters:

+ +
    + +
  • + + mock + Object + + + + +
    +

    The object to verify..

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

Returns:

+ +
+ + + Void: + + +
+
+ + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + +