Type Method

setUp()

Provides an opportunity to customize initial state before a test case begins.

Declaration

class func setUp()

Discussion

The setUp() class method is called exactly once for a test case, before its first test method is called. Override this method to customize the initial state for all tests in the test case.

See Also

Customizing Test Setup and Teardown

Understanding Setup and Teardown for Test Methods

Prepare initial state before tests run and perform cleanup after tests complete.

func addTeardownBlock(() -> Void)

Registers a block of teardown code to be run after the current test method ends.

class func tearDown()

Provides an opportunity to perform cleanup after a test case ends.