Search in sources :

Example 1 with CancelledSubscription

use of reactor.core.publisher.Operators.CancelledSubscription in project reactor-core by reactor.

the class OperatorsTest method cancelledSubscription.

@Test
public void cancelledSubscription() {
    Operators.CancelledSubscription es = (Operators.CancelledSubscription) Operators.cancelledSubscription();
    assertThat((Object) es).isEqualTo(Operators.CancelledSubscription.INSTANCE);
    // Noop
    es.cancel();
    es.request(-1);
}
Also used : CancelledSubscription(reactor.core.publisher.Operators.CancelledSubscription) CancelledSubscription(reactor.core.publisher.Operators.CancelledSubscription) Test(org.junit.Test)

Example 2 with CancelledSubscription

use of reactor.core.publisher.Operators.CancelledSubscription in project reactor-core by reactor.

the class OperatorsTest method scanCancelledSubscription.

@Test
public void scanCancelledSubscription() {
    CancelledSubscription test = CancelledSubscription.INSTANCE;
    assertThat(test.scan(Scannable.Attr.CANCELLED)).isTrue();
}
Also used : CancelledSubscription(reactor.core.publisher.Operators.CancelledSubscription) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 CancelledSubscription (reactor.core.publisher.Operators.CancelledSubscription)2