From df1261f31c4a38ee365bb0ad612452410c881a04 Mon Sep 17 00:00:00 2001 From: KKlochko Date: Tue, 19 Sep 2023 22:07:23 +0300 Subject: [PATCH] Add the Given-When-Then annotations. --- .../kklochko/simple_jbdd/annotations/Given.java | 13 +++++++++++++ .../kklochko/simple_jbdd/annotations/Then.java | 13 +++++++++++++ .../kklochko/simple_jbdd/annotations/When.java | 13 +++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 src/main/java/space/kklochko/simple_jbdd/annotations/Given.java create mode 100644 src/main/java/space/kklochko/simple_jbdd/annotations/Then.java create mode 100644 src/main/java/space/kklochko/simple_jbdd/annotations/When.java diff --git a/src/main/java/space/kklochko/simple_jbdd/annotations/Given.java b/src/main/java/space/kklochko/simple_jbdd/annotations/Given.java new file mode 100644 index 0000000..33a9187 --- /dev/null +++ b/src/main/java/space/kklochko/simple_jbdd/annotations/Given.java @@ -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"; +} + diff --git a/src/main/java/space/kklochko/simple_jbdd/annotations/Then.java b/src/main/java/space/kklochko/simple_jbdd/annotations/Then.java new file mode 100644 index 0000000..17448e1 --- /dev/null +++ b/src/main/java/space/kklochko/simple_jbdd/annotations/Then.java @@ -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"; +} + diff --git a/src/main/java/space/kklochko/simple_jbdd/annotations/When.java b/src/main/java/space/kklochko/simple_jbdd/annotations/When.java new file mode 100644 index 0000000..5ae35f2 --- /dev/null +++ b/src/main/java/space/kklochko/simple_jbdd/annotations/When.java @@ -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"; +} +