Polish
Closes gh-14517
This commit is contained in:
committed by
Stephane Nicoll
parent
efae363974
commit
521f746151
@@ -190,7 +190,7 @@ public class MockitoPostProcessorTests {
|
||||
@Configuration
|
||||
static class MultipleQualifiedBeans {
|
||||
|
||||
@MockBean(ExampleService.class)
|
||||
@MockBean
|
||||
@Qualifier("test")
|
||||
private ExampleService mock;
|
||||
|
||||
@@ -216,7 +216,7 @@ public class MockitoPostProcessorTests {
|
||||
@Configuration
|
||||
static class MockPrimaryBean {
|
||||
|
||||
@MockBean(ExampleService.class)
|
||||
@MockBean
|
||||
private ExampleService mock;
|
||||
|
||||
@Bean
|
||||
@@ -236,7 +236,7 @@ public class MockitoPostProcessorTests {
|
||||
@Configuration
|
||||
static class MockQualifiedBean {
|
||||
|
||||
@MockBean(ExampleService.class)
|
||||
@MockBean
|
||||
@Qualifier("test")
|
||||
private ExampleService mock;
|
||||
|
||||
@@ -257,7 +257,7 @@ public class MockitoPostProcessorTests {
|
||||
@Configuration
|
||||
static class SpyPrimaryBean {
|
||||
|
||||
@SpyBean(ExampleService.class)
|
||||
@SpyBean
|
||||
private ExampleService spy;
|
||||
|
||||
@Bean
|
||||
@@ -277,7 +277,7 @@ public class MockitoPostProcessorTests {
|
||||
@Configuration
|
||||
static class SpyQualifiedBean {
|
||||
|
||||
@SpyBean(ExampleService.class)
|
||||
@SpyBean
|
||||
@Qualifier("test")
|
||||
private ExampleService spy;
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ public class SpringBootTestRandomPortEnvironmentPostProcessorTests {
|
||||
@Test
|
||||
public void postProcessWhenServerAndManagementPortIsZeroInTestPropertySource() {
|
||||
addTestPropertySource("0", "0");
|
||||
this.environment.setProperty("management.server.port", "0");
|
||||
this.postProcessor.postProcessEnvironment(this.environment, null);
|
||||
assertThat(this.environment.getProperty("server.port")).isEqualTo("0");
|
||||
assertThat(this.environment.getProperty("management.server.port")).isEqualTo("0");
|
||||
@@ -81,8 +80,7 @@ public class SpringBootTestRandomPortEnvironmentPostProcessorTests {
|
||||
addTestPropertySource("0", null);
|
||||
this.postProcessor.postProcessEnvironment(this.environment, null);
|
||||
assertThat(this.environment.getProperty("server.port")).isEqualTo("0");
|
||||
assertThat(this.environment.getProperty("management.server.port"))
|
||||
.isEqualTo(null);
|
||||
assertThat(this.environment.getProperty("management.server.port")).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -100,7 +98,8 @@ public class SpringBootTestRandomPortEnvironmentPostProcessorTests {
|
||||
|
||||
@Test
|
||||
public void postProcessWhenTestServerPortIsZeroAndManagementPortIsNotNullAndDefaultSameInProduction() {
|
||||
// mgmt port is 8080 which means its on the same port as main server since that is
|
||||
// mgmt port is 8080 which means it's on the same port as main server since that
|
||||
// is
|
||||
// null in app properties
|
||||
addTestPropertySource("0", null);
|
||||
Map<String, Object> other = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user