package de.juplo.demo;
-import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import static org.mockito.ArgumentMatchers.eq;
import org.springframework.web.reactive.function.client.WebClient.RequestHeadersUriSpec;
import org.springframework.web.reactive.function.client.WebClient.ResponseSpec;
import reactor.core.publisher.Mono;
+import reactor.test.StepVerifier;
/**
Mono<String> result = service.getRemoteText("/foo");
- assertThat(result).isNotNull();
- assertThat(result.block()).isEqualTo("bar");
+ StepVerifier
+ .create(result)
+ .expectNext("bar")
+ .verifyComplete();
}
}