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
792c13e0
Commit
792c13e0
authored
Jul 30, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #17690 from dreis2211
* pr/17690: Upgrade to AssertJ 3.13.1 Closes gh-17690
parents
b6754f6f
8d2f2b75
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 @
792c13e0
...
...
@@ -89,7 +89,7 @@ class JolokiaEndpointAutoConfigurationTests {
.
withPropertyValues
(
"management.endpoints.web.exposure.include=jolokia"
).
run
((
context
)
->
{
ExposableServletEndpoint
endpoint
=
getEndpoint
(
context
);
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 @
792c13e0
...
...
@@ -149,7 +149,7 @@ class WebMvcMetricsAutoConfigurationTests {
this
.
contextRunner
.
withUserConfiguration
(
TestController
.
class
)
.
withConfiguration
(
AutoConfigurations
.
of
(
MetricsAutoConfiguration
.
class
,
WebMvcAutoConfiguration
.
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
));
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java
View file @
792c13e0
...
...
@@ -132,7 +132,7 @@ class FlywayAutoConfigurationTests {
assertThat
(
context
).
hasSingleBean
(
Flyway
.
class
);
DataSource
dataSource
=
context
.
getBean
(
Flyway
.
class
).
getDataSource
();
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 @
792c13e0
...
...
@@ -52,7 +52,7 @@ class SendGridAutoConfigurationTests {
void
expectedSendGridBeanCreatedApiKey
()
{
loadContext
(
"spring.sendgrid.api-key:SG.SECRET-API-KEY"
);
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
...
...
@@ -66,7 +66,7 @@ class SendGridAutoConfigurationTests {
void
autoConfigurationNotFiredWhenBeanAlreadyCreated
()
{
loadContext
(
ManualSendGridConfiguration
.
class
,
"spring.sendgrid.api-key:SG.SECRET-API-KEY"
);
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
...
...
@@ -75,7 +75,7 @@ class SendGridAutoConfigurationTests {
"spring.sendgrid.proxy.port:5678"
);
SendGrid
sendGrid
=
this
.
context
.
getBean
(
SendGrid
.
class
);
assertThat
(
sendGrid
).
extracting
(
"client"
).
extracting
(
"httpClient"
).
extracting
(
"routePlanner"
)
.
hasOnlyElementsOfType
(
DefaultProxyRoutePlanner
.
class
);
.
isInstanceOf
(
DefaultProxyRoutePlanner
.
class
);
}
private
void
loadContext
(
String
...
environment
)
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfigurationTests.java
View file @
792c13e0
...
...
@@ -145,11 +145,11 @@ class DispatcherServletAutoConfigurationTests {
void
dispatcherServletDefaultConfig
()
{
this
.
contextRunner
.
run
((
context
)
->
{
DispatcherServlet
dispatcherServlet
=
context
.
getBean
(
DispatcherServlet
.
class
);
assertThat
(
dispatcherServlet
).
extracting
(
"throwExceptionIfNoHandlerFound"
).
containsExactly
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchOptionsRequest"
).
containsExactly
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchTraceRequest"
).
containsExactly
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"enableLoggingRequestDetails"
).
containsExactly
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"publishEvents"
).
containsExactly
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"throwExceptionIfNoHandlerFound"
).
isEqualTo
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchOptionsRequest"
).
isEqualTo
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchTraceRequest"
).
isEqualTo
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"enableLoggingRequestDetails"
).
isEqualTo
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"publishEvents"
).
isEqualTo
(
true
);
assertThat
(
context
.
getBean
(
"dispatcherServletRegistration"
)).
hasFieldOrPropertyWithValue
(
"loadOnStartup"
,
-
1
);
});
...
...
@@ -163,10 +163,10 @@ class DispatcherServletAutoConfigurationTests {
"spring.mvc.publish-request-handled-events:false"
,
"spring.mvc.servlet.load-on-startup=5"
)
.
run
((
context
)
->
{
DispatcherServlet
dispatcherServlet
=
context
.
getBean
(
DispatcherServlet
.
class
);
assertThat
(
dispatcherServlet
).
extracting
(
"throwExceptionIfNoHandlerFound"
).
containsExactly
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchOptionsRequest"
).
containsExactly
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchTraceRequest"
).
containsExactly
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"publishEvents"
).
containsExactly
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"throwExceptionIfNoHandlerFound"
).
isEqualTo
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchOptionsRequest"
).
isEqualTo
(
false
);
assertThat
(
dispatcherServlet
).
extracting
(
"dispatchTraceRequest"
).
isEqualTo
(
true
);
assertThat
(
dispatcherServlet
).
extracting
(
"publishEvents"
).
isEqualTo
(
false
);
assertThat
(
context
.
getBean
(
"dispatcherServletRegistration"
))
.
hasFieldOrPropertyWithValue
(
"loadOnStartup"
,
5
);
});
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java
View file @
792c13e0
...
...
@@ -355,14 +355,14 @@ class WebMvcAutoConfigurationTests {
@Test
void
ignoreDefaultModelOnRedirectIsTrue
()
{
this
.
contextRunner
.
run
((
context
)
->
assertThat
(
context
.
getBean
(
RequestMappingHandlerAdapter
.
class
))
.
extracting
(
"ignoreDefaultModelOnRedirect"
).
containsExactly
(
true
));
.
extracting
(
"ignoreDefaultModelOnRedirect"
).
isEqualTo
(
true
));
}
@Test
void
overrideIgnoreDefaultModelOnRedirect
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.mvc.ignore-default-model-on-redirect:false"
)
.
run
((
context
)
->
assertThat
(
context
.
getBean
(
RequestMappingHandlerAdapter
.
class
))
.
extracting
(
"ignoreDefaultModelOnRedirect"
).
containsExactly
(
false
));
.
extracting
(
"ignoreDefaultModelOnRedirect"
).
isEqualTo
(
false
));
}
@Test
...
...
spring-boot-project/spring-boot-dependencies/pom.xml
View file @
792c13e0
...
...
@@ -39,7 +39,7 @@
<appengine-sdk.version>
1.9.75
</appengine-sdk.version>
<artemis.version>
2.9.0
</artemis.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>
<bitronix.version>
2.1.4
</bitronix.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 @
792c13e0
...
...
@@ -50,7 +50,7 @@ class MockServerRestTemplateCustomizerTests {
MockServerRestTemplateCustomizer
customizer
=
new
MockServerRestTemplateCustomizer
();
customizer
.
customize
(
new
RestTemplate
());
assertThat
(
customizer
.
getServer
()).
extracting
(
"expectationManager"
)
.
hasAtLeastOneElementOfType
(
SimpleRequestExpectationManager
.
class
);
.
isInstanceOf
(
SimpleRequestExpectationManager
.
class
);
}
@Test
...
...
@@ -65,7 +65,7 @@ class MockServerRestTemplateCustomizerTests {
UnorderedRequestExpectationManager
.
class
);
customizer
.
customize
(
new
RestTemplate
());
assertThat
(
customizer
.
getServer
()).
extracting
(
"expectationManager"
)
.
hasAtLeastOneElementOfType
(
UnorderedRequestExpectationManager
.
class
);
.
isInstanceOf
(
UnorderedRequestExpectationManager
.
class
);
}
@Test
...
...
@@ -74,7 +74,7 @@ class MockServerRestTemplateCustomizerTests {
UnorderedRequestExpectationManager
.
class
);
customizer
.
customize
(
new
RestTemplateBuilder
().
rootUri
(
"https://example.com"
).
build
());
assertThat
(
customizer
.
getServer
()).
extracting
(
"expectationManager"
)
.
hasAtLeastOneElementOfType
(
RootUriRequestExpectationManager
.
class
);
.
isInstanceOf
(
RootUriRequestExpectationManager
.
class
);
}
@Test
...
...
@@ -82,7 +82,7 @@ class MockServerRestTemplateCustomizerTests {
this
.
customizer
.
setDetectRootUri
(
false
);
this
.
customizer
.
customize
(
new
RestTemplateBuilder
().
rootUri
(
"https://example.com"
).
build
());
assertThat
(
this
.
customizer
.
getServer
()).
extracting
(
"expectationManager"
)
.
hasAtLeastOneElementOfType
(
SimpleRequestExpectationManager
.
class
);
.
isInstanceOf
(
SimpleRequestExpectationManager
.
class
);
}
...
...
@@ -153,8 +153,8 @@ class MockServerRestTemplateCustomizerTests {
this
.
customizer
.
customize
(
template2
);
RequestExpectationManager
manager1
=
this
.
customizer
.
getExpectationManagers
().
get
(
template1
);
RequestExpectationManager
manager2
=
this
.
customizer
.
getExpectationManagers
().
get
(
template2
);
assertThat
(
this
.
customizer
.
getServer
(
template1
)).
extracting
(
"expectationManager"
).
containsOnly
(
manager1
);
assertThat
(
this
.
customizer
.
getServer
(
template2
)).
extracting
(
"expectationManager"
).
containsOnly
(
manager2
);
assertThat
(
this
.
customizer
.
getServer
(
template1
)).
extracting
(
"expectationManager"
).
isEqualTo
(
manager1
);
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 @
792c13e0
...
...
@@ -142,7 +142,7 @@ class RootUriRequestExpectationManagerTests {
RequestExpectationManager
actual
=
RootUriRequestExpectationManager
.
forRestTemplate
(
restTemplate
,
this
.
delegate
);
assertThat
(
actual
).
isInstanceOf
(
RootUriRequestExpectationManager
.
class
);
assertThat
(
actual
).
extracting
(
"rootUri"
).
containsExactly
(
this
.
uri
);
assertThat
(
actual
).
extracting
(
"rootUri"
).
isEqualTo
(
this
.
uri
);
}
@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