Interface PublisherLastStep

All Known Subinterfaces:
PublisherFirstStep<T>, PublisherStep<T>

public interface PublisherLastStep
Provides the ability to express expectations for the terminal signals (e.g. onComplete or onError) of a PublisherSource.Subscriber.
  • Method Details

    • expectError

      StepVerifier expectError()
      Declare an expectation that onError will be the next signal.
      Returns:
      An object which allows to verify all expectations.
    • expectErrorMatches

      StepVerifier expectErrorMatches(Predicate<Throwable> errorPredicate)
      Declare an expectation that onError will be the next signal and evaluate it with errorPredicate.
      Parameters:
      errorPredicate - Will be invoked when onError is called and will raise a AssertionError if the predicate returns false.
      Returns:
      An object which allows to verify all expectations.
    • expectError

      StepVerifier expectError(Class<? extends Throwable> errorClass)
      Declare an expectation that onError will be the next signal and it will be of type errorClass.
      Parameters:
      errorClass - The type of error which is expected.
      Returns:
      An object which allows to verify all expectations.
    • expectErrorConsumed

      StepVerifier expectErrorConsumed(Consumer<Throwable> errorConsumer)
      Declare an expectation that onError will be the next signal and evaluate it with errorConsumer.
      Parameters:
      errorConsumer - Will be invoked when onError is called.
      Returns:
      An object which allows to verify all expectations.
    • expectComplete

      StepVerifier expectComplete()
      Declare an expectation that PublisherSource.Subscriber.onComplete() onComplete} will be the next signal.
      Returns:
      An object which allows to verify all expectations.
    • thenCancel

      StepVerifier thenCancel()
      Returns:
      An object which allows to verify all expectations.