YAHOO.namespace("tool");
//-----------------------------------------------------------------------------
// TestSuite object
//-----------------------------------------------------------------------------
/**
* A test suite that can contain a collection of TestCase and TestSuite objects.
* @param {String} name The name of the test fixture.
* @namespace YAHOO.tool
* @class TestSuite
* @constructor
*/
YAHOO.tool.TestSuite = function (name /*:String*/) {
/**
* The name of the test suite.
*/
this.name /*:String*/ = name || YAHOO.util.Dom.generateId(null, "testSuite");
/**
* Array of test suites and
* @private
*/
this.items /*:Array*/ = [];
};
YAHOO.tool.TestSuite.prototype = {
/**
* Adds a test suite or test case to the test suite.
* @param {YAHOO.tool.TestSuite||YAHOO.tool.TestCase} testObject The test suite or test case to add.
*/
add : function (testObject /*:YAHOO.tool.TestSuite*/) /*:Void*/ {
if (testObject instanceof YAHOO.tool.TestSuite || testObject instanceof YAHOO.tool.TestCase) {
this.items.push(testObject);
}
}
};