Lines Matching refs:YUITest
9 YUITest.Mock = function(template){
33 YUITest.Assert.fail("Method " + name + "() was called but was not expected to be.");
57 YUITest.Mock.expect = function(mock /*:Object*/, expectation /*:Object*/){
81 if (!(args[i] instanceof YUITest.Mock.Value)){
82 args[i] = YUITest.Mock.Value(YUITest.Assert.areSame, [args[i]], "Argument " + i + " of " + name + "() is incorrect.");
91 YUITest.Assert.areEqual(args.length, arguments.length, "Method " + name + "() passed incorrect number of arguments.");
103 YUITest.TestRunner._handleError(ex);
113 YUITest.Assert.fail("Method " + name + "() should not have been called.");
116 YUITest.TestRunner._handleError(ex);
134 YUITest.Mock.verify = function(mock){
141 YUITest.Assert.areEqual(expectation.callCount, expectation.actualCallCount, "Method " + expectation.method + "() wasn't called the expected number of times.");
143 YUITest.Assert.areEqual(expectation.value, mock[expectation.property], "Property " + expectation.property + " wasn't set to the correct value.");
150 YUITest.TestRunner._handleError(ex);
163 YUITest.Mock.Value = function(method, originalArgs, message){
164 if (this instanceof YUITest.Mock.Value){
172 return new YUITest.Mock.Value(method, originalArgs, message);
182 YUITest.Mock.Value.Any = YUITest.Mock.Value(function(){});
190 YUITest.Mock.Value.Boolean = YUITest.Mock.Value(YUITest.Assert.isBoolean);
198 YUITest.Mock.Value.Number = YUITest.Mock.Value(YUITest.Assert.isNumber);
206 YUITest.Mock.Value.String = YUITest.Mock.Value(YUITest.Assert.isString);
214 YUITest.Mock.Value.Object = YUITest.Mock.Value(YUITest.Assert.isObject);
222 YUITest.Mock.Value.Function = YUITest.Mock.Value(YUITest.Assert.isFunction);