測試java
視頻講解: https://www.bilibili.com/vide...react
FluxMonoTestCase.javaapi
package com.example.reactor; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import reactor.test.StepVerifier; @Slf4j public class FluxMonoTestCase extends BaseTestCase { @Test public void verify(){ Flux<Integer> integerFlux = Flux.range(1,5); integerFlux.subscribe(x ->System.out.print("->"+x)); StepVerifier.create(integerFlux) .expectNext(1) .expectNext(2) .expectNext(3,4,5) .expectComplete() .verify(); } }
公衆號,堅持天天3分鐘視頻學習
ide