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
f1cf6616
Commit
f1cf6616
authored
Dec 09, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ResourceBannerTests failures on Windows
Fixes gh-2096
parent
a69afa0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ResourceBannerTests.java
...st/java/org/springframework/boot/ResourceBannerTests.java
+5
-5
No files found.
spring-boot/src/test/java/org/springframework/boot/ResourceBannerTests.java
View file @
f1cf6616
...
@@ -28,7 +28,7 @@ import org.springframework.core.io.ByteArrayResource;
...
@@ -28,7 +28,7 @@ import org.springframework.core.io.ByteArrayResource;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.mock.env.MockEnvironment
;
import
org.springframework.mock.env.MockEnvironment
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
hamcrest
.
Matchers
.
startsWith
;
import
static
org
.
junit
.
Assert
.
assertThat
;
import
static
org
.
junit
.
Assert
.
assertThat
;
/**
/**
...
@@ -43,7 +43,7 @@ public class ResourceBannerTests {
...
@@ -43,7 +43,7 @@ public class ResourceBannerTests {
Resource
resource
=
new
ByteArrayResource
(
Resource
resource
=
new
ByteArrayResource
(
"banner ${a} ${spring-boot.version} ${application.version}"
.
getBytes
());
"banner ${a} ${spring-boot.version} ${application.version}"
.
getBytes
());
String
banner
=
printBanner
(
resource
,
"10.2"
,
"2.0"
);
String
banner
=
printBanner
(
resource
,
"10.2"
,
"2.0"
);
assertThat
(
banner
,
equalTo
(
"banner 1 10.2 2.0\n"
));
assertThat
(
banner
,
startsWith
(
"banner 1 10.2 2.0\n"
));
}
}
@Test
@Test
...
@@ -51,7 +51,7 @@ public class ResourceBannerTests {
...
@@ -51,7 +51,7 @@ public class ResourceBannerTests {
Resource
resource
=
new
ByteArrayResource
(
Resource
resource
=
new
ByteArrayResource
(
"banner ${a} ${spring-boot.version} ${application.version}"
.
getBytes
());
"banner ${a} ${spring-boot.version} ${application.version}"
.
getBytes
());
String
banner
=
printBanner
(
resource
,
null
,
null
);
String
banner
=
printBanner
(
resource
,
null
,
null
);
assertThat
(
banner
,
equalTo
(
"banner 1 \n"
));
assertThat
(
banner
,
startsWith
(
"banner 1 \n"
));
}
}
@Test
@Test
...
@@ -60,7 +60,7 @@ public class ResourceBannerTests {
...
@@ -60,7 +60,7 @@ public class ResourceBannerTests {
"banner ${a}${spring-boot.formatted-version}${application.formatted-version}"
"banner ${a}${spring-boot.formatted-version}${application.formatted-version}"
.
getBytes
());
.
getBytes
());
String
banner
=
printBanner
(
resource
,
"10.2"
,
"2.0"
);
String
banner
=
printBanner
(
resource
,
"10.2"
,
"2.0"
);
assertThat
(
banner
,
equalTo
(
"banner 1 (v10.2) (v2.0)\n"
));
assertThat
(
banner
,
startsWith
(
"banner 1 (v10.2) (v2.0)\n"
));
}
}
@Test
@Test
...
@@ -69,7 +69,7 @@ public class ResourceBannerTests {
...
@@ -69,7 +69,7 @@ public class ResourceBannerTests {
"banner ${a}${spring-boot.formatted-version}${application.formatted-version}"
"banner ${a}${spring-boot.formatted-version}${application.formatted-version}"
.
getBytes
());
.
getBytes
());
String
banner
=
printBanner
(
resource
,
null
,
null
);
String
banner
=
printBanner
(
resource
,
null
,
null
);
assertThat
(
banner
,
equalTo
(
"banner 1\n"
));
assertThat
(
banner
,
startsWith
(
"banner 1\n"
));
}
}
private
String
printBanner
(
Resource
resource
,
String
bootVersion
,
private
String
printBanner
(
Resource
resource
,
String
bootVersion
,
...
...
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