Move tests from 'samples' to 'test-samples'

This commit is contained in:
Phillip Webb
2013-11-04 22:20:02 -08:00
parent 065220c0fa
commit d7ae8cafbf
7 changed files with 9 additions and 9 deletions

View File

@@ -1,4 +0,0 @@
class Book {
String author
String title
}

View File

@@ -1,12 +0,0 @@
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)
}
}

View File

@@ -1,36 +0,0 @@
class FailingJUnitTests {
@Test
void passingTest() {
assertTrue(true)
}
@Test
void failureByAssertion() {
assertTrue(false)
}
@Test
void failureByException() {
throw new RuntimeException("This should also be handled")
}
}
class FailingSpockTest extends Specification {
def "this should pass"() {
expect:
name.size() == length
where:
name | length
"Spock" | 5
}
def "this should fail on purpose as well"() {
when:
String text = "Greetings"
then:
//throw new RuntimeException("This should fail!")
true == false
}
}

View File

@@ -1,12 +0,0 @@
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
}
}

View File

@@ -1,7 +0,0 @@
class BookTests {
@Test
void testBooks() {
Book book = new Book(author: "Tom Clancy", title: "Threat Vector")
assertEquals("Tom Clancy", book.author)
}
}