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
56c8bf74
Commit
56c8bf74
authored
Feb 22, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12170 from izeye:assertj
* pr/12170: Use isTrue() and isFalse() for AssertJ
parents
865775e9
2fe86da9
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
17 additions
and
17 deletions
+17
-17
ManagementServerPropertiesTests.java
...configure/web/server/ManagementServerPropertiesTests.java
+1
-1
GroovyTemplateAutoConfigurationTests.java
...groovy/template/GroovyTemplateAutoConfigurationTests.java
+1
-1
DataSourceAutoConfigurationTests.java
.../autoconfigure/jdbc/DataSourceAutoConfigurationTests.java
+1
-1
ActiveMQAutoConfigurationTests.java
...onfigure/jms/activemq/ActiveMQAutoConfigurationTests.java
+5
-5
ActiveMQPropertiesTests.java
...t/autoconfigure/jms/activemq/ActiveMQPropertiesTests.java
+2
-2
ServerPropertiesTests.java
...amework/boot/autoconfigure/web/ServerPropertiesTests.java
+2
-2
TomcatServletWebServerFactoryCustomizerTests.java
...servlet/TomcatServletWebServerFactoryCustomizerTests.java
+1
-1
LocalDevToolsAutoConfigurationTests.java
...ls/autoconfigure/LocalDevToolsAutoConfigurationTests.java
+1
-1
DefinitionsParserTests.java
...mework/boot/test/mock/mockito/DefinitionsParserTests.java
+1
-1
DelegatingFilterProxyRegistrationBeanTests.java
...b/servlet/DelegatingFilterProxyRegistrationBeanTests.java
+1
-1
AbstractServletWebServerFactoryTests.java
.../servlet/server/AbstractServletWebServerFactoryTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerPropertiesTests.java
View file @
56c8bf74
...
@@ -33,7 +33,7 @@ public class ManagementServerPropertiesTests {
...
@@ -33,7 +33,7 @@ public class ManagementServerPropertiesTests {
ManagementServerProperties
properties
=
new
ManagementServerProperties
();
ManagementServerProperties
properties
=
new
ManagementServerProperties
();
assertThat
(
properties
.
getPort
()).
isNull
();
assertThat
(
properties
.
getPort
()).
isNull
();
assertThat
(
properties
.
getServlet
().
getContextPath
()).
isEqualTo
(
""
);
assertThat
(
properties
.
getServlet
().
getContextPath
()).
isEqualTo
(
""
);
assertThat
(
properties
.
getAddApplicationContextHeader
()).
is
EqualTo
(
false
);
assertThat
(
properties
.
getAddApplicationContextHeader
()).
is
False
(
);
}
}
@Test
@Test
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfigurationTests.java
View file @
56c8bf74
...
@@ -175,7 +175,7 @@ public class GroovyTemplateAutoConfigurationTests {
...
@@ -175,7 +175,7 @@ public class GroovyTemplateAutoConfigurationTests {
registerAndRefreshContext
(
registerAndRefreshContext
(
"spring.groovy.template.configuration.auto-indent:true"
);
"spring.groovy.template.configuration.auto-indent:true"
);
assertThat
(
this
.
context
.
getBean
(
GroovyMarkupConfigurer
.
class
).
isAutoIndent
())
assertThat
(
this
.
context
.
getBean
(
GroovyMarkupConfigurer
.
class
).
isAutoIndent
())
.
is
EqualTo
(
true
);
.
is
True
(
);
}
}
private
void
registerAndRefreshContext
(
String
...
env
)
{
private
void
registerAndRefreshContext
(
String
...
env
)
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java
View file @
56c8bf74
...
@@ -137,7 +137,7 @@ public class DataSourceAutoConfigurationTests {
...
@@ -137,7 +137,7 @@ public class DataSourceAutoConfigurationTests {
public
void
commonsDbcp2ValidatesConnectionByDefault
()
{
public
void
commonsDbcp2ValidatesConnectionByDefault
()
{
assertDataSource
(
org
.
apache
.
commons
.
dbcp2
.
BasicDataSource
.
class
,
assertDataSource
(
org
.
apache
.
commons
.
dbcp2
.
BasicDataSource
.
class
,
Arrays
.
asList
(
"com.zaxxer.hikari"
,
"org.apache.tomcat"
),
(
dataSource
)
->
{
Arrays
.
asList
(
"com.zaxxer.hikari"
,
"org.apache.tomcat"
),
(
dataSource
)
->
{
assertThat
(
dataSource
.
getTestOnBorrow
()).
is
EqualTo
(
true
);
assertThat
(
dataSource
.
getTestOnBorrow
()).
is
True
(
);
assertThat
(
dataSource
.
getValidationQuery
()).
isNull
();
// Use
assertThat
(
dataSource
.
getValidationQuery
()).
isNull
();
// Use
// Connection#isValid()
// Connection#isValid()
});
});
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQAutoConfigurationTests.java
View file @
56c8bf74
...
@@ -114,7 +114,7 @@ public class ActiveMQAutoConfigurationTests {
...
@@ -114,7 +114,7 @@ public class ActiveMQAutoConfigurationTests {
assertThat
(
connectionFactory
.
getPassword
()).
isEqualTo
(
"bar"
);
assertThat
(
connectionFactory
.
getPassword
()).
isEqualTo
(
"bar"
);
assertThat
(
connectionFactory
.
getCloseTimeout
()).
isEqualTo
(
500
);
assertThat
(
connectionFactory
.
getCloseTimeout
()).
isEqualTo
(
500
);
assertThat
(
connectionFactory
.
isNonBlockingRedelivery
())
assertThat
(
connectionFactory
.
isNonBlockingRedelivery
())
.
is
EqualTo
(
true
);
.
is
True
(
);
assertThat
(
connectionFactory
.
getSendTimeout
()).
isEqualTo
(
1000
);
assertThat
(
connectionFactory
.
getSendTimeout
()).
isEqualTo
(
1000
);
assertThat
(
connectionFactory
.
isTrustAllPackages
()).
isFalse
();
assertThat
(
connectionFactory
.
isTrustAllPackages
()).
isFalse
();
assertThat
(
connectionFactory
.
getTrustedPackages
())
assertThat
(
connectionFactory
.
getTrustedPackages
())
...
@@ -178,22 +178,22 @@ public class ActiveMQAutoConfigurationTests {
...
@@ -178,22 +178,22 @@ public class ActiveMQAutoConfigurationTests {
PooledConnectionFactory
connectionFactory
=
context
PooledConnectionFactory
connectionFactory
=
context
.
getBean
(
PooledConnectionFactory
.
class
);
.
getBean
(
PooledConnectionFactory
.
class
);
assertThat
(
connectionFactory
.
isBlockIfSessionPoolIsFull
())
assertThat
(
connectionFactory
.
isBlockIfSessionPoolIsFull
())
.
is
EqualTo
(
false
);
.
is
False
(
);
assertThat
(
connectionFactory
.
getBlockIfSessionPoolIsFullTimeout
())
assertThat
(
connectionFactory
.
getBlockIfSessionPoolIsFullTimeout
())
.
isEqualTo
(
64
);
.
isEqualTo
(
64
);
assertThat
(
connectionFactory
.
isCreateConnectionOnStartup
())
assertThat
(
connectionFactory
.
isCreateConnectionOnStartup
())
.
is
EqualTo
(
false
);
.
is
False
(
);
assertThat
(
connectionFactory
.
getExpiryTimeout
()).
isEqualTo
(
4096
);
assertThat
(
connectionFactory
.
getExpiryTimeout
()).
isEqualTo
(
4096
);
assertThat
(
connectionFactory
.
getIdleTimeout
()).
isEqualTo
(
512
);
assertThat
(
connectionFactory
.
getIdleTimeout
()).
isEqualTo
(
512
);
assertThat
(
connectionFactory
.
getMaxConnections
()).
isEqualTo
(
256
);
assertThat
(
connectionFactory
.
getMaxConnections
()).
isEqualTo
(
256
);
assertThat
(
connectionFactory
.
getMaximumActiveSessionPerConnection
())
assertThat
(
connectionFactory
.
getMaximumActiveSessionPerConnection
())
.
isEqualTo
(
1024
);
.
isEqualTo
(
1024
);
assertThat
(
connectionFactory
.
isReconnectOnException
())
assertThat
(
connectionFactory
.
isReconnectOnException
())
.
is
EqualTo
(
false
);
.
is
False
(
);
assertThat
(
connectionFactory
.
getTimeBetweenExpirationCheckMillis
())
assertThat
(
connectionFactory
.
getTimeBetweenExpirationCheckMillis
())
.
isEqualTo
(
2048
);
.
isEqualTo
(
2048
);
assertThat
(
connectionFactory
.
isUseAnonymousProducers
())
assertThat
(
connectionFactory
.
isUseAnonymousProducers
())
.
is
EqualTo
(
false
);
.
is
False
(
);
});
});
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQPropertiesTests.java
View file @
56c8bf74
...
@@ -71,7 +71,7 @@ public class ActiveMQPropertiesTests {
...
@@ -71,7 +71,7 @@ public class ActiveMQPropertiesTests {
this
.
properties
.
getPackages
().
setTrustAll
(
true
);
this
.
properties
.
getPackages
().
setTrustAll
(
true
);
assertThat
(
createFactory
(
this
.
properties
)
assertThat
(
createFactory
(
this
.
properties
)
.
createConnectionFactory
(
ActiveMQConnectionFactory
.
class
)
.
createConnectionFactory
(
ActiveMQConnectionFactory
.
class
)
.
isTrustAllPackages
()).
is
EqualTo
(
true
);
.
isTrustAllPackages
()).
is
True
(
);
}
}
@Test
@Test
...
@@ -80,7 +80,7 @@ public class ActiveMQPropertiesTests {
...
@@ -80,7 +80,7 @@ public class ActiveMQPropertiesTests {
this
.
properties
.
getPackages
().
getTrusted
().
add
(
"trusted.package"
);
this
.
properties
.
getPackages
().
getTrusted
().
add
(
"trusted.package"
);
ActiveMQConnectionFactory
factory
=
createFactory
(
this
.
properties
)
ActiveMQConnectionFactory
factory
=
createFactory
(
this
.
properties
)
.
createConnectionFactory
(
ActiveMQConnectionFactory
.
class
);
.
createConnectionFactory
(
ActiveMQConnectionFactory
.
class
);
assertThat
(
factory
.
isTrustAllPackages
()).
is
EqualTo
(
false
);
assertThat
(
factory
.
isTrustAllPackages
()).
is
False
(
);
assertThat
(
factory
.
getTrustedPackages
().
size
()).
isEqualTo
(
1
);
assertThat
(
factory
.
getTrustedPackages
().
size
()).
isEqualTo
(
1
);
assertThat
(
factory
.
getTrustedPackages
().
get
(
0
)).
isEqualTo
(
"trusted.package"
);
assertThat
(
factory
.
getTrustedPackages
().
get
(
0
)).
isEqualTo
(
"trusted.package"
);
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
View file @
56c8bf74
...
@@ -175,11 +175,11 @@ public class ServerPropertiesTests {
...
@@ -175,11 +175,11 @@ public class ServerPropertiesTests {
map
.
put
(
"server.jetty.accesslog.append"
,
"true"
);
map
.
put
(
"server.jetty.accesslog.append"
,
"true"
);
bind
(
map
);
bind
(
map
);
ServerProperties
.
Jetty
jetty
=
this
.
properties
.
getJetty
();
ServerProperties
.
Jetty
jetty
=
this
.
properties
.
getJetty
();
assertThat
(
jetty
.
getAccesslog
().
isEnabled
()).
is
EqualTo
(
true
);
assertThat
(
jetty
.
getAccesslog
().
isEnabled
()).
is
True
(
);
assertThat
(
jetty
.
getAccesslog
().
getFilename
()).
isEqualTo
(
"foo.txt"
);
assertThat
(
jetty
.
getAccesslog
().
getFilename
()).
isEqualTo
(
"foo.txt"
);
assertThat
(
jetty
.
getAccesslog
().
getFileDateFormat
()).
isEqualTo
(
"yyyymmdd"
);
assertThat
(
jetty
.
getAccesslog
().
getFileDateFormat
()).
isEqualTo
(
"yyyymmdd"
);
assertThat
(
jetty
.
getAccesslog
().
getRetentionPeriod
()).
isEqualTo
(
4
);
assertThat
(
jetty
.
getAccesslog
().
getRetentionPeriod
()).
isEqualTo
(
4
);
assertThat
(
jetty
.
getAccesslog
().
isAppend
()).
is
EqualTo
(
true
);
assertThat
(
jetty
.
getAccesslog
().
isAppend
()).
is
True
(
);
}
}
private
void
bind
(
String
name
,
String
value
)
{
private
void
bind
(
String
name
,
String
value
)
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/TomcatServletWebServerFactoryCustomizerTests.java
View file @
56c8bf74
...
@@ -77,7 +77,7 @@ public class TomcatServletWebServerFactoryCustomizerTests {
...
@@ -77,7 +77,7 @@ public class TomcatServletWebServerFactoryCustomizerTests {
public
void
redirectContextRootCanBeConfigured
()
{
public
void
redirectContextRootCanBeConfigured
()
{
bind
(
"server.tomcat.redirect-context-root=false"
);
bind
(
"server.tomcat.redirect-context-root=false"
);
ServerProperties
.
Tomcat
tomcat
=
this
.
serverProperties
.
getTomcat
();
ServerProperties
.
Tomcat
tomcat
=
this
.
serverProperties
.
getTomcat
();
assertThat
(
tomcat
.
getRedirectContextRoot
()).
is
EqualTo
(
false
);
assertThat
(
tomcat
.
getRedirectContextRoot
()).
is
False
(
);
TomcatWebServer
server
=
customizeAndGetServer
();
TomcatWebServer
server
=
customizeAndGetServer
();
Context
context
=
(
Context
)
server
.
getTomcat
().
getHost
().
findChildren
()[
0
];
Context
context
=
(
Context
)
server
.
getTomcat
().
getHost
().
findChildren
()[
0
];
assertThat
(
context
.
getMapperContextRootRedirectEnabled
()).
isFalse
();
assertThat
(
context
.
getMapperContextRootRedirectEnabled
()).
isFalse
();
...
...
spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfigurationTests.java
View file @
56c8bf74
...
@@ -246,7 +246,7 @@ public class LocalDevToolsAutoConfigurationTests {
...
@@ -246,7 +246,7 @@ public class LocalDevToolsAutoConfigurationTests {
StandardWrapper
jspServletWrapper
=
(
StandardWrapper
)
context
.
findChild
(
"jsp"
);
StandardWrapper
jspServletWrapper
=
(
StandardWrapper
)
context
.
findChild
(
"jsp"
);
EmbeddedServletOptions
options
=
(
EmbeddedServletOptions
)
ReflectionTestUtils
EmbeddedServletOptions
options
=
(
EmbeddedServletOptions
)
ReflectionTestUtils
.
getField
(
jspServletWrapper
.
getServlet
(),
"options"
);
.
getField
(
jspServletWrapper
.
getServlet
(),
"options"
);
assertThat
(
options
.
getDevelopment
()).
is
EqualTo
(
true
);
assertThat
(
options
.
getDevelopment
()).
is
True
(
);
}
}
private
ConfigurableApplicationContext
initializeAndRun
(
Class
<?>
config
,
private
ConfigurableApplicationContext
initializeAndRun
(
Class
<?>
config
,
...
...
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/DefinitionsParserTests.java
View file @
56c8bf74
...
@@ -73,7 +73,7 @@ public class DefinitionsParserTests {
...
@@ -73,7 +73,7 @@ public class DefinitionsParserTests {
assertThat
(
definition
.
getExtraInterfaces
())
assertThat
(
definition
.
getExtraInterfaces
())
.
containsExactly
(
ExampleExtraInterface
.
class
);
.
containsExactly
(
ExampleExtraInterface
.
class
);
assertThat
(
definition
.
getAnswer
()).
isEqualTo
(
Answers
.
RETURNS_SMART_NULLS
);
assertThat
(
definition
.
getAnswer
()).
isEqualTo
(
Answers
.
RETURNS_SMART_NULLS
);
assertThat
(
definition
.
isSerializable
()).
is
EqualTo
(
true
);
assertThat
(
definition
.
isSerializable
()).
is
True
(
);
assertThat
(
definition
.
getReset
()).
isEqualTo
(
MockReset
.
NONE
);
assertThat
(
definition
.
getReset
()).
isEqualTo
(
MockReset
.
NONE
);
assertThat
(
definition
.
getQualifier
()).
isNull
();
assertThat
(
definition
.
getQualifier
()).
isNull
();
}
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/DelegatingFilterProxyRegistrationBeanTests.java
View file @
56c8bf74
...
@@ -91,7 +91,7 @@ public class DelegatingFilterProxyRegistrationBeanTests
...
@@ -91,7 +91,7 @@ public class DelegatingFilterProxyRegistrationBeanTests
assertThat
(
mockFilterInitialized
.
get
()).
isNull
();
assertThat
(
mockFilterInitialized
.
get
()).
isNull
();
filter
.
doFilter
(
new
MockHttpServletRequest
(),
new
MockHttpServletResponse
(),
filter
.
doFilter
(
new
MockHttpServletRequest
(),
new
MockHttpServletResponse
(),
new
MockFilterChain
());
new
MockFilterChain
());
assertThat
(
mockFilterInitialized
.
get
()).
is
EqualTo
(
true
);
assertThat
(
mockFilterInitialized
.
get
()).
is
True
(
);
}
}
@Test
@Test
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java
View file @
56c8bf74
...
@@ -982,7 +982,7 @@ public abstract class AbstractServletWebServerFactoryTests {
...
@@ -982,7 +982,7 @@ public abstract class AbstractServletWebServerFactoryTests {
JspServlet
jspServlet
=
getJspServlet
();
JspServlet
jspServlet
=
getJspServlet
();
EmbeddedServletOptions
options
=
(
EmbeddedServletOptions
)
ReflectionTestUtils
EmbeddedServletOptions
options
=
(
EmbeddedServletOptions
)
ReflectionTestUtils
.
getField
(
jspServlet
,
"options"
);
.
getField
(
jspServlet
,
"options"
);
assertThat
(
options
.
getDevelopment
()).
is
EqualTo
(
false
);
assertThat
(
options
.
getDevelopment
()).
is
False
(
);
}
}
@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