Mode

public enum Mode

The way Mocker handles unregistered urls

  • The default mode: only URLs registered with the ignore(_ url: URL) method are ignored for mocking.

    • Registered mocked URL: Mocked.
    • Registered ignored URL: Ignored by Mocker, default process is applied as if the Mocker doesn’t exist.
    • Any other URL: Raises an error.

    Declaration

    Swift

    case optout
  • Only registered mocked URLs are mocked, all others pass through.

    • Registered mocked URL: Mocked.
    • Any other URL: Ignored by Mocker, default process is applied as if the Mocker doesn’t exist.

    Declaration

    Swift

    case optin