Inherits from NSObject
Conforms to GHTestNodeDelegate
Declared in GHTestViewModel.h
GHTestViewModel.m

Overview

Test view model for use in a tree view.

Instance Methods

cancel

Cancel test run.

- (void)cancel

Declared In

GHTestViewModel.h

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

statusString:

Status description.

- (NSString *)statusString:(NSString *)prefix

Parameters

prefix

Prefix to append

Return Value

Current status string

Declared In

GHTestViewModel.h