Search in sources :

Example 1 with OnSubscriptionEvent

use of io.servicetalk.concurrent.api.test.InlinePublisherSubscriber.OnSubscriptionEvent in project servicetalk by apple.

the class InlinePublisherFirstStep method expectSubscriptionConsumed.

@Override
public PublisherStep<T> expectSubscriptionConsumed(Consumer<? super Subscription> consumer) {
    requireNonNull(consumer);
    events.add(new OnSubscriptionEvent() {

        @Override
        void subscription(Subscription subscription) {
            consumer.accept(subscription);
        }

        @Override
        String description() {
            return "expectSubscription(" + consumer + ")";
        }
    });
    return this;
}
Also used : Subscription(io.servicetalk.concurrent.PublisherSource.Subscription) OnSubscriptionEvent(io.servicetalk.concurrent.api.test.InlinePublisherSubscriber.OnSubscriptionEvent)

Aggregations

Subscription (io.servicetalk.concurrent.PublisherSource.Subscription)1 OnSubscriptionEvent (io.servicetalk.concurrent.api.test.InlinePublisherSubscriber.OnSubscriptionEvent)1