Compare commits
1
Commits
0.2.6
..
ca1e3d5670
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca1e3d5670 |
+24
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: gradle
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: test
|
||||||
|
image: gradle:8.3.0-jdk17-graal
|
||||||
|
commands:
|
||||||
|
- gradle assemble
|
||||||
|
- gradle check
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: maven
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: test
|
||||||
|
image: maven:3.9.4-eclipse-temurin-17-alpine
|
||||||
|
commands:
|
||||||
|
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
||||||
|
- mvn test -B
|
||||||
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
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.TYPE)
|
|
||||||
public @interface Title {
|
|
||||||
String value() default "Title";
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
package space.kklochko.simple_jbdd.test_examples.tests;
|
package space.kklochko.simple_jbdd.test_examples.tests;
|
||||||
|
|
||||||
import space.kklochko.simple_jbdd.annotations.Then;
|
import space.kklochko.simple_jbdd.annotations.Then;
|
||||||
import space.kklochko.simple_jbdd.annotations.Title;
|
|
||||||
import space.kklochko.simple_jbdd.tests.Test;
|
import space.kklochko.simple_jbdd.tests.Test;
|
||||||
|
|
||||||
|
|
||||||
@Title("A Simple Failed GivenWhenTest for Sum")
|
|
||||||
public class SimpleFailedThenTest extends Test {
|
public class SimpleFailedThenTest extends Test {
|
||||||
@Then
|
@Then
|
||||||
public void check() {
|
public void check() {
|
||||||
|
|||||||
-2
@@ -2,12 +2,10 @@ package space.kklochko.simple_jbdd.test_examples.tests;
|
|||||||
|
|
||||||
import space.kklochko.simple_jbdd.annotations.Given;
|
import space.kklochko.simple_jbdd.annotations.Given;
|
||||||
import space.kklochko.simple_jbdd.annotations.Then;
|
import space.kklochko.simple_jbdd.annotations.Then;
|
||||||
import space.kklochko.simple_jbdd.annotations.Title;
|
|
||||||
import space.kklochko.simple_jbdd.annotations.When;
|
import space.kklochko.simple_jbdd.annotations.When;
|
||||||
import space.kklochko.simple_jbdd.test_examples.samples.Sum;
|
import space.kklochko.simple_jbdd.test_examples.samples.Sum;
|
||||||
import space.kklochko.simple_jbdd.tests.Test;
|
import space.kklochko.simple_jbdd.tests.Test;
|
||||||
|
|
||||||
@Title("A Simple GivenWhenTest for Sum")
|
|
||||||
public class SimpleGivenWhenThenTest extends Test {
|
public class SimpleGivenWhenThenTest extends Test {
|
||||||
private Sum sum;
|
private Sum sum;
|
||||||
private int a;
|
private int a;
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
package space.kklochko.simple_jbdd.test_examples.tests;
|
package space.kklochko.simple_jbdd.test_examples.tests;
|
||||||
|
|
||||||
import space.kklochko.simple_jbdd.annotations.Then;
|
import space.kklochko.simple_jbdd.annotations.Then;
|
||||||
import space.kklochko.simple_jbdd.annotations.Title;
|
|
||||||
import space.kklochko.simple_jbdd.tests.Test;
|
import space.kklochko.simple_jbdd.tests.Test;
|
||||||
|
|
||||||
@Title("Simple test")
|
|
||||||
public class SimpleThenTest extends Test {
|
public class SimpleThenTest extends Test {
|
||||||
@Then("The sum of 10 and 20 is 30.")
|
@Then
|
||||||
public void check() {
|
public void check() {
|
||||||
assert 30 == 10 + 20;
|
assert 30 == 10 + 20;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user