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
f7d6f383
Commit
f7d6f383
authored
Aug 22, 2020
by
dreis2211
Committed by
Phillip Webb
Aug 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typos in tests
See gh-23050
parent
d123c924
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
18 deletions
+18
-18
CloudPlatformTests.java
...va/org/springframework/boot/cloud/CloudPlatformTests.java
+2
-2
ConfigDataActivationContextTests.java
...boot/context/config/ConfigDataActivationContextTests.java
+4
-4
ConfigDataEnvironmentPostProcessorIntegrationTests.java
...g/ConfigDataEnvironmentPostProcessorIntegrationTests.java
+3
-3
ConfigDataEnvironmentTests.java
...ework/boot/context/config/ConfigDataEnvironmentTests.java
+2
-2
InvalidConfigDataPropertyExceptionTests.java
...ntext/config/InvalidConfigDataPropertyExceptionTests.java
+4
-4
NotConstructorBoundInjectionFailureAnalyzerTests.java
...ies/NotConstructorBoundInjectionFailureAnalyzerTests.java
+1
-1
PropertiesPropertySourceLoaderTests.java
...amework/boot/env/PropertiesPropertySourceLoaderTests.java
+1
-1
DefaultErrorAttributesTests.java
...k/boot/web/servlet/error/DefaultErrorAttributesTests.java
+1
-1
No files found.
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/cloud/CloudPlatformTests.java
View file @
f7d6f383
...
...
@@ -154,7 +154,7 @@ class CloudPlatformTests {
}
@Test
void
isEnforcedWhenEnvironmentPropertyIsMissing
atch
ReturnsFalse
()
{
void
isEnforcedWhenEnvironmentPropertyIsMissingReturnsFalse
()
{
MockEnvironment
environment
=
new
MockEnvironment
();
assertThat
(
CloudPlatform
.
KUBERNETES
.
isEnforced
(
environment
)).
isFalse
();
}
...
...
@@ -172,7 +172,7 @@ class CloudPlatformTests {
}
@Test
void
isEnforcedWhenBinderPropertyIsMissing
atch
ReturnsFalse
()
{
void
isEnforcedWhenBinderPropertyIsMissingReturnsFalse
()
{
Binder
binder
=
new
Binder
(
new
MockConfigurationPropertySource
());
assertThat
(
CloudPlatform
.
KUBERNETES
.
isEnforced
(
binder
)).
isFalse
();
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataActivationContextTests.java
View file @
f7d6f383
...
...
@@ -50,8 +50,8 @@ class ConfigDataActivationContextTests {
}
@Test
void
getCloudPlatformWhenClou
l
dPropertyInEnvironmentDeducesCloudPlatform
()
{
MockEnvironment
environment
=
createKuberntesEnvironment
();
void
getCloudPlatformWhenCloudPropertyInEnvironmentDeducesCloudPlatform
()
{
MockEnvironment
environment
=
createKubern
e
tesEnvironment
();
Binder
binder
=
Binder
.
get
(
environment
);
ConfigDataActivationContext
context
=
new
ConfigDataActivationContext
(
environment
,
binder
);
assertThat
(
context
.
getCloudPlatform
()).
isEqualTo
(
CloudPlatform
.
KUBERNETES
);
...
...
@@ -59,7 +59,7 @@ class ConfigDataActivationContextTests {
@Test
void
getCloudPlatformWhenCloudPropertyHasBeenContributedDuringInitialLoadDeducesCloudPlatform
()
{
Environment
environment
=
createKuberntesEnvironment
();
Environment
environment
=
createKubern
e
tesEnvironment
();
Binder
binder
=
new
Binder
(
new
MapConfigurationPropertySource
(
Collections
.
singletonMap
(
"spring.main.cloud-platform"
,
"HEROKU"
)));
ConfigDataActivationContext
context
=
new
ConfigDataActivationContext
(
environment
,
binder
);
...
...
@@ -85,7 +85,7 @@ class ConfigDataActivationContextTests {
assertThat
(
context
.
getProfiles
()).
isEqualTo
(
profiles
);
}
private
MockEnvironment
createKuberntesEnvironment
()
{
private
MockEnvironment
createKubern
e
tesEnvironment
()
{
MockEnvironment
environment
=
new
MockEnvironment
();
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"KUBERNETES_SERVICE_HOST"
,
"host"
);
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentPostProcessorIntegrationTests.java
View file @
f7d6f383
...
...
@@ -218,7 +218,7 @@ class ConfigDataEnvironmentPostProcessorIntegrationTests {
}
@Test
void
runWhenHasSystemPropertyLoadsWithSystemPropertyTakingPrece
n
dence
()
{
void
runWhenHasSystemPropertyLoadsWithSystemPropertyTakingPrecedence
()
{
System
.
setProperty
(
"the.property"
,
"fromsystem"
);
ConfigurableApplicationContext
context
=
this
.
application
.
run
(
"--spring.config.name=testproperties"
);
String
property
=
context
.
getEnvironment
().
getProperty
(
"the.property"
);
...
...
@@ -226,7 +226,7 @@ class ConfigDataEnvironmentPostProcessorIntegrationTests {
}
@Test
void
runWhenHasDefaultPropertiesIncluesDefaultPropertiesLast
()
{
void
runWhenHasDefaultPropertiesInclu
d
esDefaultPropertiesLast
()
{
this
.
application
.
setDefaultProperties
(
Collections
.
singletonMap
(
"my.fallback"
,
"foo"
));
ConfigurableApplicationContext
context
=
this
.
application
.
run
();
String
property
=
context
.
getEnvironment
().
getProperty
(
"my.fallback"
);
...
...
@@ -249,7 +249,7 @@ class ConfigDataEnvironmentPostProcessorIntegrationTests {
}
@Test
void
runWhenProgrammticallySetProfilesLoadsWithSetProfilesTakePrecedenceOverDefaultProfile
()
{
void
runWhenProgramm
a
ticallySetProfilesLoadsWithSetProfilesTakePrecedenceOverDefaultProfile
()
{
this
.
application
.
setAdditionalProfiles
(
"other"
);
ConfigurableApplicationContext
context
=
this
.
application
.
run
();
String
property
=
context
.
getEnvironment
().
getProperty
(
"my.property"
);
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentTests.java
View file @
f7d6f383
...
...
@@ -149,7 +149,7 @@ class ConfigDataEnvironmentTests {
}
@Test
void
processAndApplyMovesDefaultProperySourceToLast
(
TestInfo
info
)
{
void
processAndApplyMovesDefaultProper
t
ySourceToLast
(
TestInfo
info
)
{
MockPropertySource
defaultPropertySource
=
new
MockPropertySource
(
"defaultProperties"
);
this
.
environment
.
getPropertySources
().
addFirst
(
defaultPropertySource
);
this
.
environment
.
setProperty
(
"spring.config.location"
,
getConfigLocation
(
info
));
...
...
@@ -188,7 +188,7 @@ class ConfigDataEnvironmentTests {
}
@Test
@Disabled
(
"Disabled until spring.profiles supp
p
ort is dropped"
)
@Disabled
(
"Disabled until spring.profiles support is dropped"
)
void
processAndApplyWhenHasInvalidPropertyThrowsException
()
{
this
.
environment
.
setProperty
(
"spring.profile"
,
"a"
);
ConfigDataEnvironment
configDataEnvironment
=
new
ConfigDataEnvironment
(
this
.
logFactory
,
this
.
bootstrapRegistry
,
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/InvalidConfigDataPropertyExceptionTests.java
View file @
f7d6f383
...
...
@@ -42,9 +42,9 @@ class InvalidConfigDataPropertyExceptionTests {
private
ConfigurationPropertyName
replacement
=
ConfigurationPropertyName
.
of
(
"replacement"
);
private
ConfigurationPropertyName
invaid
=
ConfigurationPropertyName
.
of
(
"invalid"
);
private
ConfigurationPropertyName
inva
l
id
=
ConfigurationPropertyName
.
of
(
"invalid"
);
private
ConfigurationProperty
property
=
new
ConfigurationProperty
(
this
.
invaid
,
"bad"
,
MockOrigin
.
of
(
"origin"
));
private
ConfigurationProperty
property
=
new
ConfigurationProperty
(
this
.
inva
l
id
,
"bad"
,
MockOrigin
.
of
(
"origin"
));
private
Log
logger
=
mock
(
Log
.
class
);
...
...
@@ -68,7 +68,7 @@ class InvalidConfigDataPropertyExceptionTests {
@Test
void
createWhenNoOriginHasCorrectMessage
()
{
ConfigurationProperty
property
=
new
ConfigurationProperty
(
this
.
invaid
,
"bad"
,
null
);
ConfigurationProperty
property
=
new
ConfigurationProperty
(
this
.
inva
l
id
,
"bad"
,
null
);
assertThat
(
new
InvalidConfigDataPropertyException
(
property
,
this
.
replacement
,
this
.
location
)).
hasMessage
(
"Property 'invalid' imported from location 'test' is invalid and should be replaced with 'replacement'"
);
}
...
...
@@ -95,7 +95,7 @@ class InvalidConfigDataPropertyExceptionTests {
}
@Test
@Disabled
(
"Disabled until spring.profiles supp
p
ort is dropped"
)
@Disabled
(
"Disabled until spring.profiles support is dropped"
)
void
throwOrWarnWhenHasInvalidPropertyThrowsException
()
{
MockPropertySource
propertySource
=
new
MockPropertySource
();
propertySource
.
setProperty
(
"spring.profiles"
,
"a"
);
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/NotConstructorBoundInjectionFailureAnalyzerTests.java
View file @
f7d6f383
...
...
@@ -50,7 +50,7 @@ class NotConstructorBoundInjectionFailureAnalyzerTests {
}
@Test
void
failureAna
yl
sisForNonConstructorBoundProperties
()
{
void
failureAna
ly
sisForNonConstructorBoundProperties
()
{
FailureAnalysis
analysis
=
analyzeFailure
(
createFailure
(
JavaBeanBoundPropertiesConfiguration
.
class
));
assertThat
(
analysis
).
isNull
();
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/PropertiesPropertySourceLoaderTests.java
View file @
f7d6f383
...
...
@@ -49,7 +49,7 @@ class PropertiesPropertySourceLoaderTests {
}
@Test
void
loadMultiDocumentPropertiesWithSeparatorAtTheBeginning
o
fFile
()
throws
Exception
{
void
loadMultiDocumentPropertiesWithSeparatorAtTheBeginning
O
fFile
()
throws
Exception
{
List
<
PropertySource
<?>>
loaded
=
this
.
loader
.
load
(
"test.properties"
,
new
ClassPathResource
(
"multi-document-properties-2.properties"
,
getClass
()));
assertThat
(
loaded
.
size
()).
isEqualTo
(
2
);
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/error/DefaultErrorAttributesTests.java
View file @
f7d6f383
...
...
@@ -269,7 +269,7 @@ class DefaultErrorAttributesTests {
}
@Test
void
whenGetMessageIsOverridenThenMessageAttributeContainsValueReturnedFromIt
()
{
void
whenGetMessageIsOverrid
d
enThenMessageAttributeContainsValueReturnedFromIt
()
{
Map
<
String
,
Object
>
attributes
=
new
DefaultErrorAttributes
()
{
@Override
...
...
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