SenTestSuite


Inherits From:
SenTest
Conforms To:
NSCoding
Declared In:
SenTestSuite.h


Class Description

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

    
    SenTestSuite *suite= [SenTestSuite testSuiteWithName:@"My tests"];
    [suite addTest: [MathTest testCaseWithSelector:@selector(testAdd)]];
    [suite addTest: [MathTest testCaseWithSelector:@selector(testDivideByZero)]];
    

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.

    
    SenTestSuite *suite= [SenTestSuite testSuiteForTestCaseClass:[MathTest class]];
    

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

And finally, a TestSuite of all the test cases found in the runtime can be created automatically:

    
    SenTestSuite *suite = [SenTestSuite defaultTestSuite];
    

This creates a suite of suites with all the SenTestCase subclasses methods starting with "test" that take no arguments.


Instance Variables

NSString *name;
NSMutableArray *tests;

nameNo description.
testsNo description.


Method Types

+ defaultTestSuite
+ testSuiteForBundlePath:
+ testSuiteForTestCaseWithName:
+ testSuiteForTestCaseClass:
+ testSuiteWithName:
- initWithName:
- addTest:
- addTests:


Class Methods

defaultTestSuite

+ (id)defaultTestSuite

No method description.


testSuiteForBundlePath:

+ (id)testSuiteForBundlePath:(NSString *)bundlePath

No method description.


testSuiteForTestCaseClass:

+ (id)testSuiteForTestCaseClass:(Class)aClass

No method description.


testSuiteForTestCaseWithName:

+ (id)testSuiteForTestCaseWithName:(NSString *)aName

No method description.


testSuiteWithName:

+ (id)testSuiteWithName:(NSString *)aName

No method description.


Instance Methods

addTest:

- (void)addTest:(SenTest *)aTest

No method description.


addTests:

- (void)addTests:(id <SenCollection>)aCollection

No method description.


initWithName:

- (id)initWithName:(NSString *)aName

No method description.


Version 1.6 Copyright ©2001 by Sen:te (Sente SA). All Rights Reserved.