Add the Sum class to test as an example.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package space.kklochko.simple_jbdd.test_examples;
|
||||
|
||||
public class Sum {
|
||||
static int sum(int a, int b) {
|
||||
return a + b;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package space.kklochko.simple_jbdd.test_examples
|
||||
|
||||
import spock.lang.Specification
|
||||
|
||||
class SumSpec extends Specification {
|
||||
def "Adding two numbers"() {
|
||||
expect: "Two plus three is five."
|
||||
5 == Sum.sum(2, 3);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user