Polish
This commit is contained in:
parent
0e6d3697e4
commit
32b9945632
|
@ -16,7 +16,6 @@
|
|||
|
||||
package org.springframework.boot.actuate.autoconfigure.cloudfoundry.reactive;
|
||||
|
||||
import org.assertj.core.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.aot.hint.RuntimeHints;
|
||||
|
@ -25,6 +24,8 @@ import org.springframework.boot.actuate.autoconfigure.cloudfoundry.reactive.Clou
|
|||
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.reactive.CloudFoundryWebFluxEndpointHandlerMapping.CloudFoundryWebFluxEndpointHandlerMappingRuntimeHints;
|
||||
import org.springframework.boot.actuate.endpoint.web.Link;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link CloudFoundryWebFluxEndpointHandlerMapping}.
|
||||
*
|
||||
|
@ -37,9 +38,9 @@ class CloudFoundryWebFluxEndpointHandlerMappingTests {
|
|||
RuntimeHints runtimeHints = new RuntimeHints();
|
||||
new CloudFoundryWebFluxEndpointHandlerMappingRuntimeHints().registerHints(runtimeHints,
|
||||
getClass().getClassLoader());
|
||||
Assertions.assertThat(RuntimeHintsPredicates.reflection().onMethod(CloudFoundryLinksHandler.class, "links"))
|
||||
assertThat(RuntimeHintsPredicates.reflection().onMethod(CloudFoundryLinksHandler.class, "links"))
|
||||
.accepts(runtimeHints);
|
||||
Assertions.assertThat(RuntimeHintsPredicates.reflection().onType(Link.class)).accepts(runtimeHints);
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(Link.class)).accepts(runtimeHints);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import java.util.UUID;
|
|||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.assertj.core.api.Assertions;
|
||||
import org.flywaydb.core.Flyway;
|
||||
import org.flywaydb.core.api.Location;
|
||||
import org.flywaydb.core.api.MigrationVersion;
|
||||
|
@ -671,9 +670,8 @@ class FlywayAutoConfigurationTests {
|
|||
void shouldRegisterResourceHints() {
|
||||
RuntimeHints runtimeHints = new RuntimeHints();
|
||||
new FlywayAutoConfigurationRuntimeHints().registerHints(runtimeHints, getClass().getClassLoader());
|
||||
Assertions.assertThat(RuntimeHintsPredicates.resource().forResource("db/migration/")).accepts(runtimeHints);
|
||||
Assertions.assertThat(RuntimeHintsPredicates.resource().forResource("db/migration/V1__init.sql"))
|
||||
.accepts(runtimeHints);
|
||||
assertThat(RuntimeHintsPredicates.resource().forResource("db/migration/")).accepts(runtimeHints);
|
||||
assertThat(RuntimeHintsPredicates.resource().forResource("db/migration/V1__init.sql")).accepts(runtimeHints);
|
||||
}
|
||||
|
||||
private ContextConsumer<AssertableApplicationContext> validateFlywayTeamsPropertyOnly(String propertyName) {
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
package smoketest.rsocket;
|
||||
|
||||
import io.rsocket.metadata.WellKnownMimeType;
|
||||
import org.assertj.core.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import reactor.core.publisher.Mono;
|
||||
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.util.MimeTypeUtils;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@SpringBootTest(properties = "spring.rsocket.server.port=0")
|
||||
class SampleRSocketApplicationTests {
|
||||
|
||||
|
@ -54,8 +55,7 @@ class SampleRSocketApplicationTests {
|
|||
MimeTypeUtils.parseMimeType(WellKnownMimeType.MESSAGE_RSOCKET_AUTHENTICATION.getString()))
|
||||
.tcp("localhost", this.port);
|
||||
Mono<Project> result = requester.route("find.project.spring-boot").retrieveMono(Project.class);
|
||||
StepVerifier.create(result)
|
||||
.assertNext((project) -> Assertions.assertThat(project.getName()).isEqualTo("spring-boot"))
|
||||
StepVerifier.create(result).assertNext((project) -> assertThat(project.getName()).isEqualTo("spring-boot"))
|
||||
.verifyComplete();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue