Taps
public final class Taps: OfferingTaps
This is the entry point for all of your tests.
Declare a function that takes Tape and write your tests!
In order to see how to test in detail see Test.
func describeYourTestSubject(taps: Taps) {
taps.test("test property") { (t: Test)
// Test property in here...
t.end()
}
// more tests here...
}
// Starting tests
Tape.runMain(tests: [
describeYourTestSubject
])
If you want to test Observables, use RxTaps.
-
Creates a cold
Tapsinstance using aTapsHarness, that won’t start runningTests by default.Parameter
Parameter harness: TheTapsHarnessthat shall be used. UsesTapHarness.printHarnessby default.Declaration
Swift
public init(harness: TapsHarness? = nil)Parameters
harnessThe
TapsHarnessthat shall be used. UsesTapHarness.printHarnessby default. -
Returns an observable running all tests. Only emits one single or an error.
Declaration
Swift
public var runner: Observable<TestCount> -
Starts to execute all
Tests for the currentTaps. All tests will be interrupted on dispose.Declaration
Swift
public func start() -> Disposable -
Starts to execute all
Tests for the currentTaps. All tests run until all are finished.Declaration
Swift
public func run() -
Starts to execute all
Tests for the currentTaps. Thereafter, there won’t be executed anything. Exits with 1 if there were errors.Declaration
Swift
public func runMain() -> Never -
Declaration
Swift
public var testCaseObserver: AnyObserver<TestCase> -
Creates a cold
Taps, that executes all givenTests. Uses the print harnessTapHarness.printHarness.Parameter
Parameter harness: The harness, that interprets the output.Parameter
Parameter tests: All tests to be executed.Declaration
Swift
public static func with(_ harness: TapsHarness? = nil, tests: [(Taps) -> Void]) -> TapsParameters
harnessThe harness, that interprets the output.
testsAll tests to be executed.
-
Creates a cold
Observable, that executes all givenTests. Uses the print harnessTapHarness.printHarness.Parameter
Parameter harness: The harness, that interprets the output.Parameter
Parameter tests: All tests to be executed.Declaration
Swift
public static func runner( with harness: TapsHarness? = nil, testing tests: [(Taps) -> Void] ) -> Observable<TestCount>Parameters
harnessThe harness, that interprets the output.
testsAll tests to be executed.
-
Creates a hot
Taps, that executes all givenTests. All tests will be interrupted on dispose.Parameter
Parameter harness: The harness, that interprets the output.Parameter
Parameter tests: All tests to be executed.Declaration
Swift
public static func start(with harness: TapsHarness? = nil, testing tests: [(Taps) -> Void]) -> DisposableParameters
harnessThe harness, that interprets the output.
testsAll tests to be executed.
-
Creates a hot
Taps, that executes all givenTests. All tests will be executed. Exits with 1 if there were errors. All tests will be interrupted whenTapsgets deinitialized.Parameter
Parameter harness: The harness, that interprets the output.Parameter
Parameter tests: All tests to be executed.Declaration
Swift
public static func runMain(with harness: TapsHarness? = nil, testing tests: [(Taps) -> Void]) -> NeverParameters
harnessThe harness, that interprets the output.
testsAll tests to be executed.
-
Creates a hot
Taps, that executes all givenTests. All tests will be interrupted whenTapsgets deinitialized.Parameter
Parameter harness: The harness, that interprets the output.Parameter
Parameter tests: All tests to be executed.Declaration
Swift
public static func run(with harness: TapsHarness? = nil, testing tests: [(Taps) -> Void]) -> TapsParameters
harnessThe harness, that interprets the output.
testsAll tests to be executed.
View on GitHub
Install in Dash
Taps Class Reference