NetworkTaskMock

public class NetworkTaskMock : NetworkTask

Mock implementation for NetworkTask.

  • Mock state of the network task

    See more

    Declaration

    Swift

    public enum State
  • Creates an NetworkTaskMock instance

    Declaration

    Swift

    public init()
  • State of the network taks. Can be used to assert.

    Declaration

    Swift

    public private(set) var state: NetworkTaskMock.State?
  • Cancel the request. Sets state to cancled.

    Declaration

    Swift

    public func cancel()
  • Resumes the request. Sets state to resumed.

    Declaration

    Swift

    public func resume()
  • Suspends the request. Sets state to suspended.

    Declaration

    Swift

    public func suspend()