mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-07 17:59:02 +00:00
Add 'spring test [files]' command to compile and test code automatically
- Look for JUnit test symbols, and add JUnit automatically - Look for Spock test symbols, and add Spock automatically - Based on what test libraries were used, invoke relevant embedded testers and accumulate results - Make it so that multiple testers can be invoked through a single 'test' command - Print out total results and write out detailed trace errors in results.txt - Update based on the new artifact resolution mechanism
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
class Book {
|
||||
String author
|
||||
String title
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class Book {
|
||||
String author
|
||||
String title
|
||||
}
|
||||
|
||||
class BookTests {
|
||||
@Test
|
||||
void testBooks() {
|
||||
Book book = new Book(author: "Tom Clancy", title: "Threat Vector")
|
||||
assertEquals("Tom Clancy", book.author)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class HelloSpock extends Specification {
|
||||
def "length of Spock's and his friends' names"() {
|
||||
expect:
|
||||
name.size() == length
|
||||
|
||||
where:
|
||||
name | length
|
||||
"Spock" | 5
|
||||
"Kirk" | 4
|
||||
"Scotty" | 6
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class BookTests {
|
||||
@Test
|
||||
void testBooks() {
|
||||
Book book = new Book(author: "Tom Clancy", title: "Threat Vector")
|
||||
assertEquals("Tom Clancy", book.author)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user