Add the Sum class to test as an example.

This commit is contained in:
2023-09-19 22:01:10 +03:00
parent dabb09c518
commit 4136775a1f
2 changed files with 19 additions and 0 deletions
@@ -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);
}
}