OPEN INTRA-MART im-UISupplements Client Side JavaScript

クラス im.jsunit.TestSuite

Object
   |
   +--im.jsunit.Test
         |
         +--im.jsunit.TestSuite

class im.jsunit.TestSuite
extends im.jsunit.Test


A TestSuite is a Composite of Tests. It runs a collection of test cases. Here is an example using the dynamic test definition.


 var suite = new im.jsunit.TestSuite();
 suite.addTest(new FooTest("foo"));
 suite.addTest(new BarTest("bar"));
 

Alternatively, a TestSuite can extract the tests to be run automatically. To do so you pass the class of your TestCase class to the TestSuite constructor.

 var suite = new TestSuite(FooTest.class);
 

This constructor creates a suite with all the methods starting with "test" that take no arguments.


Version: 0.1

Author: emooru
Defined in TestSuite.js


コンストラクタの概要
im.jsunit.TestSuite(<im.lang.Class> testCaseClass)
            コンストラクタ。
 
メソッドの概要
 void addTest(<im.jsunit.Test> test)
           Adds a test to the suite.
 void addTestSuite(testCase)
           Adds the tests from the given class to the suite
 Number countTestCases()
           Counts the number of test cases that will be run by this test.
 String getName()
           Returns the name of the suite.
 void run(<im.jsunit.TestResult> result)
           Runs the tests and collects their result in a TestResult.
 void runTest(<im.jsunit.Test> test, <im.jsunit.TestResult> result)
          
 void setName(<String> name)
           Sets the name of the suite.
 im.jsunit.Test testAt(<Number> index)
           Returns the test at the given index
 Number testCount()
           Returns the number of tests in this suite.
 Array tests()
           Returns the tests as an Array.
 String toString()
           Returns the name of test.
<static> im.jsunit.Test createTest(<im.lang.Class> theClass, <String> name)
           ...as the moon sets over the early morning Merlin, Oregon mountains, our intrepid adventurers type...
<static> im.jsunit.Test warning(<String> message)
           Returns a test which will fail and log a warning message.

コンストラクタの詳細

im.jsunit.TestSuite

im.jsunit.TestSuite(<im.lang.Class> testCaseClass)

メソッドの詳細

addTest

void addTest(<im.jsunit.Test> test)

addTestSuite

void addTestSuite(testCase)

countTestCases

Number countTestCases()

getName

String getName()

run

void run(<im.jsunit.TestResult> result)

runTest

void runTest(<im.jsunit.Test> test, <im.jsunit.TestResult> result)

setName

void setName(<String> name)

testAt

im.jsunit.Test testAt(<Number> index)

testCount

Number testCount()

tests

Array tests()

toString

String toString()

createTest

<static> im.jsunit.Test createTest(<im.lang.Class> theClass, <String> name)

warning

<static> im.jsunit.Test warning(<String> message)

OPEN INTRA-MART im-UISupplements Client Side JavaScript

このドキュメントはJSDoc によって Sun Sep 28 20:00:25 2008に作成されました。