Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
8d2f2b75
Commit
8d2f2b75
authored
Jul 29, 2019
by
dreis2211
Committed by
Stephane Nicoll
Jul 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to AssertJ 3.13.1
See gh-17690
parent
b6754f6f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
25 deletions
+25
-25
JolokiaEndpointAutoConfigurationTests.java
...figure/jolokia/JolokiaEndpointAutoConfigurationTests.java
+1
-1
WebMvcMetricsAutoConfigurationTests.java
...rics/web/servlet/WebMvcMetricsAutoConfigurationTests.java
+1
-1
FlywayAutoConfigurationTests.java
...ot/autoconfigure/flyway/FlywayAutoConfigurationTests.java
+1
-1
SendGridAutoConfigurationTests.java
...utoconfigure/sendgrid/SendGridAutoConfigurationTests.java
+3
-3
DispatcherServletAutoConfigurationTests.java
.../web/servlet/DispatcherServletAutoConfigurationTests.java
+9
-9
WebMvcAutoConfigurationTests.java
...toconfigure/web/servlet/WebMvcAutoConfigurationTests.java
+2
-2
pom.xml
spring-boot-project/spring-boot-dependencies/pom.xml
+1
-1
MockServerRestTemplateCustomizerTests.java
...est/web/client/MockServerRestTemplateCustomizerTests.java
+6
-6
RootUriRequestExpectationManagerTests.java
...est/web/client/RootUriRequestExpectationManagerTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/jolokia/JolokiaEndpointAutoConfigurationTests.java
View file @
8d2f2b75
...
@@ -89,7 +89,7 @@ class JolokiaEndpointAutoConfigurationTests {
...
@@ -89,7 +89,7 @@ class JolokiaEndpointAutoConfigurationTests {
.
withPropertyValues
(
"management.endpoints.web.exposure.include=jolokia"
).
run
((
context
)
->
{
.
withPropertyValues
(
"management.endpoints.web.exposure.include=jolokia"
).
run
((
context
)
->
{
ExposableServletEndpoint
endpoint
=
getEndpoint
(
context
);
ExposableServletEndpoint
endpoint
=
getEndpoint
(
context
);
assertThat
(
endpoint
.
getEndpointServlet
()).
extracting
(
"initParameters"
)
assertThat
(
endpoint
.
getEndpointServlet
()).
extracting
(
"initParameters"
)
.
containsOnly
(
Collections
.
singletonMap
(
"debug"
,
"true"
));
.
isEqualTo
(
Collections
.
singletonMap
(
"debug"
,
"true"
));
});
});
}
}
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/servlet/WebMvcMetricsAutoConfigurationTests.java
View file @
8d2f2b75
...
@@ -149,7 +149,7 @@ class WebMvcMetricsAutoConfigurationTests {
...
@@ -149,7 +149,7 @@ class WebMvcMetricsAutoConfigurationTests {
this
.
contextRunner
.
withUserConfiguration
(
TestController
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
TestController
.
class
)
.
withConfiguration
(
AutoConfigurations
.
of
(
MetricsAutoConfiguration
.
class
,
WebMvcAutoConfiguration
.
class
))
.
withConfiguration
(
AutoConfigurations
.
of
(
MetricsAutoConfiguration
.
class
,
WebMvcAutoConfiguration
.
class
))
.
run
((
context
)
->
assertThat
(
context
.
getBean
(
RequestMappingHandlerMapping
.
class
))
.
run
((
context
)
->
assertThat
(
context
.
getBean
(
RequestMappingHandlerMapping
.
class
))
.
extracting
(
"interceptors"
).
element
(
0
).
asList
().
extracting
((
item
)
->
(
Class
)
item
.
getClass
())
.
extracting
(
"interceptors"
).
asList
().
extracting
((
item
)
->
(
Class
)
item
.
getClass
())
.
contains
(
LongTaskTimingHandlerInterceptor
.
class
));
.
contains
(
LongTaskTimingHandlerInterceptor
.
class
));
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java
View file @
8d2f2b75
...
@@ -132,7 +132,7 @@ class FlywayAutoConfigurationTests {
...
@@ -132,7 +132,7 @@ class FlywayAutoConfigurationTests {
assertThat
(
context
).
hasSingleBean
(
Flyway
.
class
);
assertThat
(
context
).
hasSingleBean
(
Flyway
.
class
);
DataSource
dataSource
=
context
.
getBean
(
Flyway
.
class
).
getDataSource
();
DataSource
dataSource
=
context
.
getBean
(
Flyway
.
class
).
getDataSource
();
assertThat
(
dataSource
).
isNotNull
();
assertThat
(
dataSource
).
isNotNull
();
assertThat
(
dataSource
).
extracting
(
"url"
).
hasSize
(
1
).
first
().
asString
().
startsWith
(
"jdbc:h2:mem:"
);
assertThat
(
dataSource
).
extracting
(
"url"
).
asString
().
startsWith
(
"jdbc:h2:mem:"
);
});
});
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java
View file @
8d2f2b75
...
@@ -52,7 +52,7 @@ class SendGridAutoConfigurationTests {
...
@@ -52,7 +52,7 @@ class SendGridAutoConfigurationTests {
void
expectedSendGridBeanCreatedApiKey
()
{
void
expectedSendGridBeanCreatedApiKey
()
{
loadContext
(
"spring.sendgrid.api-key:SG.SECRET-API-KEY"
);
loadContext
(
"spring.sendgrid.api-key:SG.SECRET-API-KEY"
);
SendGrid
sendGrid
=
this
.
context
.
getBean
(
SendGrid
.
class
);
SendGrid
sendGrid
=
this
.
context
.
getBean
(
SendGrid
.
class
);
assertThat
(
sendGrid
).
extracting
(
"apiKey"
).
containsExactly
(
"SG.SECRET-API-KEY"
);
assertThat
(
sendGrid
).
extracting
(
"apiKey"
).
isEqualTo
(
"SG.SECRET-API-KEY"
);
}
}
@Test
@Test
...
@@ -66,7 +66,7 @@ class SendGridAutoConfigurationTests {
...
@@ -66,7 +66,7 @@ class SendGridAutoConfigurationTests {
void
autoConfigurationNotFiredWhenBeanAlreadyCreated
()
{
void
autoConfigurationNotFiredWhenBeanAlreadyCreated
()
{
loadContext
(
ManualSendGridConfiguration
.
class
,
"spring.sendgrid.api-key:SG.SECRET-API-KEY"
);
loadContext
(
ManualSendGridConfiguration
.
class
,
"spring.sendgrid.api-key:SG.SECRET-API-KEY"
);
SendGrid
sendGrid
=
this
.
context
.
getBean
(
SendGrid
.
class
);
SendGrid
sendGrid
=
this
.
context
.
getBean
(
SendGrid
.
class
);
assertThat
(
sendGrid
).
extracting
(
"apiKey"
).
containsExactly
(
"SG.CUSTOM_API_KEY"
);
assertThat
(
sendGrid
).
extracting
(
"apiKey"
).
isEqualTo
(
"SG.CUSTOM_API_KEY"
);
}
}
@Test
@Test
...
@@ -75,7 +75,7 @@ class SendGridAutoConfigurationTests {
...
@@ -75,7 +75,7 @@ class SendGridAutoConfigurationTests {
"spring.sendgrid.proxy.port:5678"
);
"spring.sendgrid.proxy.port:5678"
);
SendGrid
sendGrid
=
this
.
context
.
getBean
(
SendGrid
.
class
);
SendGrid
sendGrid
=
this
.
context
.
getBean
(
SendGrid
.
class
);
assertThat
(
sendGrid
).
extracting
(
"client"
).
extracting
(
"httpClient"
).
extracting
(
"routePlanner"
)
assertThat
(
sendGrid
).
extracting
(
"client"
).
extracting
(
"httpClient"
).
extracting
(
"routePlanner"
)
.
hasOnlyElementsOfType
(
DefaultProxyRoutePlanner
.
class
);
.
isInstanceOf
(
DefaultProxyRoutePlanner
.
class
);
}
}
private
void
loadContext
(
String
...
environment
)
{
private
void
loadContext
(
String
...
environment
)
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfigurationTests.java
View file @
8d2f2b75
...
@@ -145,11 +145,11 @@ class DispatcherServletAutoConfigurationTests {
...
@@ -145,11 +145,11 @@ class DispatcherServletAutoConfigurationTests {
void
dispatcherServletDefaultConfig
()
{
void
dispatcherServletDefaultConfig
()
{
this
.
contextRunner
.
run
((
context
)
->
{
this
.
contextRunner
.
run
((
context
)
->
{
DispatcherServlet
dispatcherServlet
=
context
.
getBean
(
DispatcherServlet
.
class
);
DispatcherServlet
dispatcherServlet
=
context
.
getBean
(
DispatcherServlet
.
class
);
assertThat
(
dispatcherServlet
).
extracting
(
"throwExceptionIfNoHandlerFound"
).
containsExactly
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"throwExceptionIfNoHandlerFound"
).
isEqualTo
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchOptionsRequest"
).
containsExactly
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchOptionsRequest"
).
isEqualTo
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchTraceRequest"
).
containsExactly
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchTraceRequest"
).
isEqualTo
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"enableLoggingRequestDetails"
).
containsExactly
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"enableLoggingRequestDetails"
).
isEqualTo
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"publishEvents"
).
containsExactly
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"publishEvents"
).
isEqualTo
(
true
);
assertThat
(
context
.
getBean
(
"dispatcherServletRegistration"
)).
hasFieldOrPropertyWithValue
(
"loadOnStartup"
,
assertThat
(
context
.
getBean
(
"dispatcherServletRegistration"
)).
hasFieldOrPropertyWithValue
(
"loadOnStartup"
,
-
1
);
-
1
);
});
});
...
@@ -163,10 +163,10 @@ class DispatcherServletAutoConfigurationTests {
...
@@ -163,10 +163,10 @@ class DispatcherServletAutoConfigurationTests {
"spring.mvc.publish-request-handled-events:false"
,
"spring.mvc.servlet.load-on-startup=5"
)
"spring.mvc.publish-request-handled-events:false"
,
"spring.mvc.servlet.load-on-startup=5"
)
.
run
((
context
)
->
{
.
run
((
context
)
->
{
DispatcherServlet
dispatcherServlet
=
context
.
getBean
(
DispatcherServlet
.
class
);
DispatcherServlet
dispatcherServlet
=
context
.
getBean
(
DispatcherServlet
.
class
);
assertThat
(
dispatcherServlet
).
extracting
(
"throwExceptionIfNoHandlerFound"
).
containsExactly
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"throwExceptionIfNoHandlerFound"
).
isEqualTo
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchOptionsRequest"
).
containsExactly
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchOptionsRequest"
).
isEqualTo
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchTraceRequest"
).
containsExactly
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchTraceRequest"
).
isEqualTo
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"publishEvents"
).
containsExactly
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"publishEvents"
).
isEqualTo
(
false
);
assertThat
(
context
.
getBean
(
"dispatcherServletRegistration"
))
assertThat
(
context
.
getBean
(
"dispatcherServletRegistration"
))
.
hasFieldOrPropertyWithValue
(
"loadOnStartup"
,
5
);
.
hasFieldOrPropertyWithValue
(
"loadOnStartup"
,
5
);
});
});
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java
View file @
8d2f2b75
...
@@ -355,14 +355,14 @@ class WebMvcAutoConfigurationTests {
...
@@ -355,14 +355,14 @@ class WebMvcAutoConfigurationTests {
@Test
@Test
void
ignoreDefaultModelOnRedirectIsTrue
()
{
void
ignoreDefaultModelOnRedirectIsTrue
()
{
this
.
contextRunner
.
run
((
context
)
->
assertThat
(
context
.
getBean
(
RequestMappingHandlerAdapter
.
class
))
this
.
contextRunner
.
run
((
context
)
->
assertThat
(
context
.
getBean
(
RequestMappingHandlerAdapter
.
class
))
.
extracting
(
"ignoreDefaultModelOnRedirect"
).
containsExactly
(
true
));
.
extracting
(
"ignoreDefaultModelOnRedirect"
).
isEqualTo
(
true
));
}
}
@Test
@Test
void
overrideIgnoreDefaultModelOnRedirect
()
{
void
overrideIgnoreDefaultModelOnRedirect
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.mvc.ignore-default-model-on-redirect:false"
)
this
.
contextRunner
.
withPropertyValues
(
"spring.mvc.ignore-default-model-on-redirect:false"
)
.
run
((
context
)
->
assertThat
(
context
.
getBean
(
RequestMappingHandlerAdapter
.
class
))
.
run
((
context
)
->
assertThat
(
context
.
getBean
(
RequestMappingHandlerAdapter
.
class
))
.
extracting
(
"ignoreDefaultModelOnRedirect"
).
containsExactly
(
false
));
.
extracting
(
"ignoreDefaultModelOnRedirect"
).
isEqualTo
(
false
));
}
}
@Test
@Test
...
...
spring-boot-project/spring-boot-dependencies/pom.xml
View file @
8d2f2b75
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<appengine-sdk.version>
1.9.75
</appengine-sdk.version>
<appengine-sdk.version>
1.9.75
</appengine-sdk.version>
<artemis.version>
2.9.0
</artemis.version>
<artemis.version>
2.9.0
</artemis.version>
<aspectj.version>
1.9.4
</aspectj.version>
<aspectj.version>
1.9.4
</aspectj.version>
<assertj.version>
3.1
2.2
</assertj.version>
<assertj.version>
3.1
3.1
</assertj.version>
<atomikos.version>
4.0.6
</atomikos.version>
<atomikos.version>
4.0.6
</atomikos.version>
<bitronix.version>
2.1.4
</bitronix.version>
<bitronix.version>
2.1.4
</bitronix.version>
<byte-buddy.version>
1.9.13
</byte-buddy.version>
<byte-buddy.version>
1.9.13
</byte-buddy.version>
...
...
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/MockServerRestTemplateCustomizerTests.java
View file @
8d2f2b75
...
@@ -50,7 +50,7 @@ class MockServerRestTemplateCustomizerTests {
...
@@ -50,7 +50,7 @@ class MockServerRestTemplateCustomizerTests {
MockServerRestTemplateCustomizer
customizer
=
new
MockServerRestTemplateCustomizer
();
MockServerRestTemplateCustomizer
customizer
=
new
MockServerRestTemplateCustomizer
();
customizer
.
customize
(
new
RestTemplate
());
customizer
.
customize
(
new
RestTemplate
());
assertThat
(
customizer
.
getServer
()).
extracting
(
"expectationManager"
)
assertThat
(
customizer
.
getServer
()).
extracting
(
"expectationManager"
)
.
hasAtLeastOneElementOfType
(
SimpleRequestExpectationManager
.
class
);
.
isInstanceOf
(
SimpleRequestExpectationManager
.
class
);
}
}
@Test
@Test
...
@@ -65,7 +65,7 @@ class MockServerRestTemplateCustomizerTests {
...
@@ -65,7 +65,7 @@ class MockServerRestTemplateCustomizerTests {
UnorderedRequestExpectationManager
.
class
);
UnorderedRequestExpectationManager
.
class
);
customizer
.
customize
(
new
RestTemplate
());
customizer
.
customize
(
new
RestTemplate
());
assertThat
(
customizer
.
getServer
()).
extracting
(
"expectationManager"
)
assertThat
(
customizer
.
getServer
()).
extracting
(
"expectationManager"
)
.
hasAtLeastOneElementOfType
(
UnorderedRequestExpectationManager
.
class
);
.
isInstanceOf
(
UnorderedRequestExpectationManager
.
class
);
}
}
@Test
@Test
...
@@ -74,7 +74,7 @@ class MockServerRestTemplateCustomizerTests {
...
@@ -74,7 +74,7 @@ class MockServerRestTemplateCustomizerTests {
UnorderedRequestExpectationManager
.
class
);
UnorderedRequestExpectationManager
.
class
);
customizer
.
customize
(
new
RestTemplateBuilder
().
rootUri
(
"https://example.com"
).
build
());
customizer
.
customize
(
new
RestTemplateBuilder
().
rootUri
(
"https://example.com"
).
build
());
assertThat
(
customizer
.
getServer
()).
extracting
(
"expectationManager"
)
assertThat
(
customizer
.
getServer
()).
extracting
(
"expectationManager"
)
.
hasAtLeastOneElementOfType
(
RootUriRequestExpectationManager
.
class
);
.
isInstanceOf
(
RootUriRequestExpectationManager
.
class
);
}
}
@Test
@Test
...
@@ -82,7 +82,7 @@ class MockServerRestTemplateCustomizerTests {
...
@@ -82,7 +82,7 @@ class MockServerRestTemplateCustomizerTests {
this
.
customizer
.
setDetectRootUri
(
false
);
this
.
customizer
.
setDetectRootUri
(
false
);
this
.
customizer
.
customize
(
new
RestTemplateBuilder
().
rootUri
(
"https://example.com"
).
build
());
this
.
customizer
.
customize
(
new
RestTemplateBuilder
().
rootUri
(
"https://example.com"
).
build
());
assertThat
(
this
.
customizer
.
getServer
()).
extracting
(
"expectationManager"
)
assertThat
(
this
.
customizer
.
getServer
()).
extracting
(
"expectationManager"
)
.
hasAtLeastOneElementOfType
(
SimpleRequestExpectationManager
.
class
);
.
isInstanceOf
(
SimpleRequestExpectationManager
.
class
);
}
}
...
@@ -153,8 +153,8 @@ class MockServerRestTemplateCustomizerTests {
...
@@ -153,8 +153,8 @@ class MockServerRestTemplateCustomizerTests {
this
.
customizer
.
customize
(
template2
);
this
.
customizer
.
customize
(
template2
);
RequestExpectationManager
manager1
=
this
.
customizer
.
getExpectationManagers
().
get
(
template1
);
RequestExpectationManager
manager1
=
this
.
customizer
.
getExpectationManagers
().
get
(
template1
);
RequestExpectationManager
manager2
=
this
.
customizer
.
getExpectationManagers
().
get
(
template2
);
RequestExpectationManager
manager2
=
this
.
customizer
.
getExpectationManagers
().
get
(
template2
);
assertThat
(
this
.
customizer
.
getServer
(
template1
)).
extracting
(
"expectationManager"
).
containsOnly
(
manager1
);
assertThat
(
this
.
customizer
.
getServer
(
template1
)).
extracting
(
"expectationManager"
).
isEqualTo
(
manager1
);
assertThat
(
this
.
customizer
.
getServer
(
template2
)).
extracting
(
"expectationManager"
).
containsOnly
(
manager2
);
assertThat
(
this
.
customizer
.
getServer
(
template2
)).
extracting
(
"expectationManager"
).
isEqualTo
(
manager2
);
}
}
}
}
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/web/client/RootUriRequestExpectationManagerTests.java
View file @
8d2f2b75
...
@@ -142,7 +142,7 @@ class RootUriRequestExpectationManagerTests {
...
@@ -142,7 +142,7 @@ class RootUriRequestExpectationManagerTests {
RequestExpectationManager
actual
=
RootUriRequestExpectationManager
.
forRestTemplate
(
restTemplate
,
RequestExpectationManager
actual
=
RootUriRequestExpectationManager
.
forRestTemplate
(
restTemplate
,
this
.
delegate
);
this
.
delegate
);
assertThat
(
actual
).
isInstanceOf
(
RootUriRequestExpectationManager
.
class
);
assertThat
(
actual
).
isInstanceOf
(
RootUriRequestExpectationManager
.
class
);
assertThat
(
actual
).
extracting
(
"rootUri"
).
containsExactly
(
this
.
uri
);
assertThat
(
actual
).
extracting
(
"rootUri"
).
isEqualTo
(
this
.
uri
);
}
}
@Test
@Test
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment