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
51f0d88e
Commit
51f0d88e
authored
Jan 17, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Add test to spring-boot-sample-quartz"
Closes gh-11621
parent
5f1f04a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
pom.xml
spring-boot-samples/spring-boot-sample-quartz/pom.xml
+1
-0
SampleQuartzApplicationTests.java
...test/java/sample/quartz/SampleQuartzApplicationTests.java
+7
-3
No files found.
spring-boot-samples/spring-boot-sample-quartz/pom.xml
View file @
51f0d88e
...
...
@@ -19,6 +19,7 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-quartz
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
...
...
spring-boot-samples/spring-boot-sample-quartz/src/test/java/sample/quartz/SampleQuartzApplicationTests.java
View file @
51f0d88e
...
...
@@ -19,7 +19,9 @@ package sample.quartz;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.test.rule.OutputCapture
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
...
...
@@ -35,9 +37,11 @@ public class SampleQuartzApplicationTests {
@Test
public
void
test
()
{
SampleQuartzApplication
.
main
(
new
String
[
0
]);
String
output
=
this
.
outputCapture
.
toString
();
assertThat
(
output
).
contains
(
"Hello World!"
);
try
(
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
SampleQuartzApplication
.
class
))
{
String
output
=
this
.
outputCapture
.
toString
();
assertThat
(
output
).
contains
(
"Hello World!"
);
}
}
}
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