Class RxTestObserver<T>

java.lang.Object
io.reactivex.rxjava3.observers.BaseTestConsumer<T,io.reactivex.rxjava3.observers.TestObserver<T>>
io.reactivex.rxjava3.observers.TestObserver<T>
org.saynotobugs.confidence.rxjava3.adapters.RxTestObserver<T>
All Implemented Interfaces:
io.reactivex.rxjava3.core.CompletableObserver, io.reactivex.rxjava3.core.MaybeObserver<T>, io.reactivex.rxjava3.core.Observer<T>, io.reactivex.rxjava3.core.SingleObserver<T>, io.reactivex.rxjava3.disposables.Disposable, RxTestAdapter<T>

public final class RxTestObserver<T> extends io.reactivex.rxjava3.observers.TestObserver<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.
    void
     
    long
     
     
    boolean
     
    newValues(int count)
    Returns the next count values that have not been acknowledged so far.

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

    assertSubscribed, create, create, dispose, hasSubscription, isDisposed, onComplete, onError, onNext, onSubscribe, onSuccess

    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
  • Constructor Details

    • RxTestObserver

      public RxTestObserver()
  • 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>
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface RxTestAdapter<T>
    • cancel

      public void cancel()
      Specified by:
      cancel in interface RxTestAdapter<T>