Class RxTestSubscriber<T>

java.lang.Object
io.reactivex.rxjava3.observers.BaseTestConsumer<T,io.reactivex.rxjava3.subscribers.TestSubscriber<T>>
io.reactivex.rxjava3.subscribers.TestSubscriber<T>
org.saynotobugs.confidence.rxjava3.adapters.RxTestSubscriber<T>
All Implemented Interfaces:
io.reactivex.rxjava3.core.FlowableSubscriber<T>, org.reactivestreams.Subscriber<T>, org.reactivestreams.Subscription, RxTestAdapter<T>

public final class RxTestSubscriber<T> extends io.reactivex.rxjava3.subscribers.TestSubscriber<T> implements RxTestAdapter<T>
  • Field Summary

    Fields inherited from class io.reactivex.rxjava3.observers.BaseTestConsumer

    checkSubscriptionOnce, completions, done, errors, lastThread, tag, timeout, values
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    ack(int count)
     
    void
    awaitNext(int count)
    Waits (at most 5 seconds) for at least count values to be emitted.
    long
     
     
    newValues(int count)
    Returns the next count values that have not been acknowledged so far.

    Methods inherited from class io.reactivex.rxjava3.subscribers.TestSubscriber

    assertSubscribed, cancel, create, create, create, dispose, hasSubscription, isCancelled, isDisposed, onComplete, onError, onNext, onStart, onSubscribe, request, requestMore

    Methods inherited from class io.reactivex.rxjava3.observers.BaseTestConsumer

    assertComplete, assertEmpty, assertError, assertError, assertError, assertFailure, assertNoErrors, assertNotComplete, assertNoValues, assertResult, assertValue, assertValue, assertValueAt, assertValueAt, assertValueCount, assertValues, assertValueSequence, assertValuesOnly, await, await, awaitCount, awaitDone, fail, valueAndClass, values, withTag

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.saynotobugs.confidence.rxjava3.RxTestAdapter

    cancel, isCancelled
  • Constructor Details

    • RxTestSubscriber

      public RxTestSubscriber()
  • Method Details

    • completions

      public long completions()
      Specified by:
      completions in interface RxTestAdapter<T>
    • newValues

      public Collection<T> newValues(int count)
      Description copied from interface: RxTestAdapter
      Returns the next count values that have not been acknowledged so far. The result will have fewer elements if no count elements have been emitted.
      Specified by:
      newValues in interface RxTestAdapter<T>
    • awaitNext

      public void awaitNext(int count)
      Description copied from interface: RxTestAdapter
      Waits (at most 5 seconds) for at least count values to be emitted. This method returns without an error even if no count have been emitted.
      Specified by:
      awaitNext in interface RxTestAdapter<T>
    • ack

      public void ack(int count)
      Specified by:
      ack in interface RxTestAdapter<T>
    • errors

      public Iterable<Throwable> errors()
      Specified by:
      errors in interface RxTestAdapter<T>