GHTestViewModel Class Reference
Inherits from | NSObject |
Conforms to | GHTestNodeDelegate |
Declared in | GHTestViewModel.h GHTestViewModel.m |
Tasks
-
– initWithIdentifier:suite:
Create view model with root test group node.
-
– name
Name of test suite.
-
– statusString:
Status description.
-
– findTestNodeForTest:
Find the test node from the test.
-
– findFailure
Find the first failure.
-
– findFailureFromNode:
Find the next failure starting from node.
-
– registerNode:
Register node, so that we can do a lookup later. See findTestNodeForTest:.
-
– numberOfGroups
Returns the number of test groups.
-
– numberOfTestsInGroup:
Returns the number of tests in group.
-
– indexPathToTest:
Search for path to test.
-
– loadDefaults
Load defaults (user settings saved with saveDefaults).
-
– saveDefaults
Save defaults (user settings to be loaded with loadDefaults).
-
– run:inParallel:options:
Run with current test suite.
-
– cancel
Cancel test run.
-
– isRunning
Check if running.
Instance Methods
findFailure
Find the first failure.
- (GHTestNode *)findFailure
Return Value
The first failure
Declared In
GHTestViewModel.h
findFailureFromNode:
Find the next failure starting from node.
- (GHTestNode *)findFailureFromNode:(GHTestNode *)node
Parameters
- node
Node to start from
Declared In
GHTestViewModel.h
findTestNodeForTest:
Find the test node from the test.
- (GHTestNode *)findTestNodeForTest:(id<GHTest>)test
Parameters
- test
Find test
Declared In
GHTestViewModel.h
indexPathToTest:
Search for path to test.
- (NSIndexPath *)indexPathToTest:(id<GHTest>)test
Parameters
- test
Test
Return Value
Index path
Declared In
GHTestViewModel.h
initWithIdentifier:suite:
Create view model with root test group node.
- (id)initWithIdentifier:(NSString *)identifier suite:(GHTestSuite *)suite
Parameters
- identifier
Unique identifier for test model (used to load defaults)
- suite
Suite
Declared In
GHTestViewModel.h
isRunning
Check if running.
- (BOOL)isRunning
Return Value
YES if running.
Declared In
GHTestViewModel.h
loadDefaults
Load defaults (user settings saved with saveDefaults).
- (void)loadDefaults
Declared In
GHTestViewModel.h
name
Name of test suite.
- (NSString *)name
Return Value
Name of test suite.
Declared In
GHTestViewModel.h
numberOfGroups
Returns the number of test groups.
- (NSInteger)numberOfGroups
Return Value
Returns the number of test groups.
Declared In
GHTestViewModel.h
numberOfTestsInGroup:
Returns the number of tests in group.
- (NSInteger)numberOfTestsInGroup:(NSInteger)group
Parameters
- group
Group number
Return Value
The number of tests in group.
Declared In
GHTestViewModel.h
registerNode:
Register node, so that we can do a lookup later. See findTestNodeForTest:.
- (void)registerNode:(GHTestNode *)node
Parameters
- node
Node to register
Declared In
GHTestViewModel.h
run:inParallel:options:
Run with current test suite.
- (void)run:(id<GHTestRunnerDelegate>)delegate inParallel:(BOOL)inParallel options:(GHTestOptions)options
Parameters
- delegate
Callback
- inParallel
If YES, will run tests in operation queue
- options
Options
Declared In
GHTestViewModel.h
saveDefaults
Save defaults (user settings to be loaded with loadDefaults).
- (void)saveDefaults
Declared In
GHTestViewModel.h