jsUnitTestSuite.js
975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
function jsUnitTestSuite() {
this.isjsUnitTestSuite = true;
this.testPages = Array();
this.pageIndex = 0;
}
jsUnitTestSuite.prototype.addTestPage = function (pageName)
{
this.testPages[this.testPages.length] = pageName;
}
jsUnitTestSuite.prototype.addTestSuite = function (suite)
{
for (var i = 0; i < suite.testPages.length; i++)
this.addTestPage(suite.testPages[i]);
}
jsUnitTestSuite.prototype.containsTestPages = function ()
{
return this.testPages.length > 0;
}
jsUnitTestSuite.prototype.nextPage = function ()
{
return this.testPages[this.pageIndex++];
}
jsUnitTestSuite.prototype.hasMorePages = function ()
{
return this.pageIndex < this.testPages.length;
}
jsUnitTestSuite.prototype.clone = function ()
{
var clone = new jsUnitTestSuite();
clone.testPages = this.testPages;
return clone;
}
if (xbDEBUG.on)
{
xbDebugTraceObject('window', 'jsUnitTestSuite');
}