|
|
@ -17,7 +17,6 @@
|
|
|
|
package smoketest.rsocket;
|
|
|
|
package smoketest.rsocket;
|
|
|
|
|
|
|
|
|
|
|
|
import io.rsocket.metadata.WellKnownMimeType;
|
|
|
|
import io.rsocket.metadata.WellKnownMimeType;
|
|
|
|
import org.assertj.core.api.Assertions;
|
|
|
|
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import reactor.core.publisher.Mono;
|
|
|
|
import reactor.core.publisher.Mono;
|
|
|
|
import reactor.test.StepVerifier;
|
|
|
|
import reactor.test.StepVerifier;
|
|
|
@ -30,6 +29,8 @@ import org.springframework.security.rsocket.metadata.SimpleAuthenticationEncoder
|
|
|
|
import org.springframework.security.rsocket.metadata.UsernamePasswordMetadata;
|
|
|
|
import org.springframework.security.rsocket.metadata.UsernamePasswordMetadata;
|
|
|
|
import org.springframework.util.MimeTypeUtils;
|
|
|
|
import org.springframework.util.MimeTypeUtils;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
|
|
|
|
|
|
|
|
@SpringBootTest(properties = "spring.rsocket.server.port=0")
|
|
|
|
@SpringBootTest(properties = "spring.rsocket.server.port=0")
|
|
|
|
class SampleRSocketApplicationTests {
|
|
|
|
class SampleRSocketApplicationTests {
|
|
|
|
|
|
|
|
|
|
|
@ -54,8 +55,7 @@ class SampleRSocketApplicationTests {
|
|
|
|
MimeTypeUtils.parseMimeType(WellKnownMimeType.MESSAGE_RSOCKET_AUTHENTICATION.getString()))
|
|
|
|
MimeTypeUtils.parseMimeType(WellKnownMimeType.MESSAGE_RSOCKET_AUTHENTICATION.getString()))
|
|
|
|
.tcp("localhost", this.port);
|
|
|
|
.tcp("localhost", this.port);
|
|
|
|
Mono<Project> result = requester.route("find.project.spring-boot").retrieveMono(Project.class);
|
|
|
|
Mono<Project> result = requester.route("find.project.spring-boot").retrieveMono(Project.class);
|
|
|
|
StepVerifier.create(result)
|
|
|
|
StepVerifier.create(result).assertNext((project) -> assertThat(project.getName()).isEqualTo("spring-boot"))
|
|
|
|
.assertNext((project) -> Assertions.assertThat(project.getName()).isEqualTo("spring-boot"))
|
|
|
|
|
|
|
|
.verifyComplete();
|
|
|
|
.verifyComplete();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|