Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1332c838b | ||
|
|
df1261f31c |
@@ -0,0 +1,13 @@
|
|||||||
|
package space.kklochko.simple_jbdd.annotations;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
public @interface Given {
|
||||||
|
String value() default "Given";
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package space.kklochko.simple_jbdd.annotations;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
public @interface Then {
|
||||||
|
String value() default "Then";
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package space.kklochko.simple_jbdd.annotations;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
public @interface When {
|
||||||
|
String value() default "When";
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package space.kklochko.simple_jbdd.test_examples;
|
|
||||||
|
|
||||||
public class Sum {
|
|
||||||
static int sum(int a, int b) {
|
|
||||||
return a + b;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package space.kklochko.simple_jbdd.test_examples.samples;
|
||||||
|
|
||||||
|
public class Sum {
|
||||||
|
public static int sum(int a, int b) {
|
||||||
|
return a + b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
package space.kklochko.simple_jbdd.test_examples
|
package space.kklochko.simple_jbdd.test_examples.samples
|
||||||
|
|
||||||
|
import space.kklochko.simple_jbdd.test_examples.samples.Sum
|
||||||
import spock.lang.Specification
|
import spock.lang.Specification
|
||||||
|
|
||||||
class SumSpec extends Specification {
|
class SumSpec extends Specification {
|
||||||
Reference in New Issue
Block a user