TestCase.js revision 6eccb99d95a457b8714d60222b7bbc2ebaa0c1f2
/**
* YUI JavaScript Testing Framework
*
* @module yuitest
*/
Y.namespace("Test");
/**
* Test case containing various tests to run.
* @param template An object containing any number of test methods, other methods,
* an optional name, and anything else the test case needs.
* @class Case
* @namespace Test
* @constructor
*/
/**
* Special rules for the test case. Possible subobjects
* are fail, for tests that should fail, and error, for
* tests that should throw an error.
*/
this._should = {};
//copy over all properties from the template to this object
}
//check for a valid name
/**
* Name for the test case.
*/
}
};
/**
* Resumes a paused test and runs the given function.
* @param {Function} segment (Optional) The function to run.
* If omitted, the test automatically passes.
* @return {Void}
* @method resume
*/
},
/**
* Causes the test case to wait a specified amount of time and then
* continue executing the given code.
* @param {Function} segment (Optional) The function to run after the delay.
* If omitted, the TestRunner will wait until resume() is called.
* @param {int} delay (Optional) The number of milliseconds to wait before running
* the function. If omitted, defaults to zero.
* @return {Void}
* @method wait
*/
} else {
}
},
//-------------------------------------------------------------------------
// Stub Methods
//-------------------------------------------------------------------------
/**
* Function to run before each test is executed.
* @return {Void}
* @method setUp
*/
setUp : function () {
},
/**
* Function to run after each test is executed.
* @return {Void}
* @method tearDown
*/
tearDown: function () {
}
};
/**
* Represents a stoppage in test execution to wait for an amount of time before
* continuing.
* @param {Function} segment A function to run when the wait is over.
* @param {int} delay The number of milliseconds to wait before running the code.
* @class Wait
* @namespace Test
* @constructor
*
*/
/**
* The segment of code to run when the wait is over.
* @type Function
* @property segment
*/
/**
* The delay before running the segment of code.
* @type int
* @property delay
*/
};