SwiftyMockyTestObserver

public class SwiftyMockyTestObserver : NSObject, XCTestObservation

Used for observing tests and handling internal library errors.

  • Call this method to setup custom error handling for SwiftyMocky, that allows to gracefully handle missing stub fatal errors. In general it should be done automatically and there should be no reason to call it directly.

    Declaration

    Swift

    public static func setup()
  • [Internal] Observer for test start

    Declaration

    Swift

    public func testCaseWillStart(_ testCase: XCTestCase)

    Parameters

    testCase

    current test

  • [Internal] Observer for test finished

    Declaration

    Swift

    public func testCaseDidFinish(_ testCase: XCTestCase)

    Parameters

    testCase

    current test

  • [Internal] used to notify about internal error. Do not call it directly.

    Declaration

    Swift

    public static func handleFatalError(message: String, file: StaticString, line: UInt)

    Parameters

    message

    Message

    file

    File

    line

    Line