Class TestStreams


  • public class TestStreams
    extends java.lang.Object
    Utility methods which enable testing of StreamObservers.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  TestStreams.Builder<T>
      A builder for a test CallStreamObserver that performs various callbacks.
    • Constructor Summary

      Constructors 
      Constructor Description
      TestStreams()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> TestStreams.Builder<T> withOnNext​(java.util.function.Consumer<T> onNext)
      Creates a test CallStreamObserver TestStreams.Builder that forwards StreamObserver.onNext(V) calls to the supplied Consumer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TestStreams

        public TestStreams()
    • Method Detail

      • withOnNext

        public static <T> TestStreams.Builder<T> withOnNext​(java.util.function.Consumer<T> onNext)
        Creates a test CallStreamObserver TestStreams.Builder that forwards StreamObserver.onNext(V) calls to the supplied Consumer.