TestableSubscriber

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public final class TestableSubscriber<Input, Failure> where Failure : Error
extension TestableSubscriber: Subscriber
extension TestableSubscriber: Cancellable

A subscriber that keeps a time-stamped log of the events that occur during the lifetime of a subscription to an arbitrary publisher.

Initializable using the factory methods on TestScheduler

  • A time-stamped log of Signals produced during the lifetime of a subscription to a publisher.

    Declaration

    Swift

    public internal(set) var recordedOutput: TestSequence<Input, Failure> { get }
  • A time-stamped account of Subscribers.Demands issued upstream, and incoming elements downstream, during the lifetime of a subscription to a publisher.

    Declaration

    Swift

    public internal(set) var recordedDemandLog: DemandLedger<VirtualTime> { get }

Subscriber conformance

  • Declaration

    Swift

    public func receive(subscription: Subscription)
  • Declaration

    Swift

    public func receive(_ input: Input) -> Subscribers.Demand
  • Declaration

    Swift

    public func receive(completion: Subscribers.Completion<Failure>)

Cancellable conformance

  • Declaration

    Swift

    public func cancel()