diff --git a/.gitignore b/.gitignore index 40a2477..5e1b6be 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ testem.log # System Files .DS_Store Thumbs.db +/CucumberTests/target/ diff --git a/CucumberTests/pom.xml b/CucumberTests/pom.xml new file mode 100644 index 0000000..8aaba7a --- /dev/null +++ b/CucumberTests/pom.xml @@ -0,0 +1,33 @@ + + + 4.0.0 + + de.taskhub + CucumberTests + 1.0-SNAPSHOT + + 1.8 + 1.8 + + + + io.cucumber + cucumber-java + 2.3.1 + test + + + io.cucumber + cucumber-junit + 2.3.1 + test + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + + \ No newline at end of file diff --git a/CucumberTests/src/test/java/RunTest.java b/CucumberTests/src/test/java/RunTest.java new file mode 100644 index 0000000..a7e37ea --- /dev/null +++ b/CucumberTests/src/test/java/RunTest.java @@ -0,0 +1,11 @@ +import cucumber.api.CucumberOptions; +import cucumber.api.junit.Cucumber; +import org.junit.runner.RunWith; + +@RunWith(Cucumber.class) +@CucumberOptions( + features = {"src/test/resource/demo.feature"} +) + +public class RunTest { +} diff --git a/CucumberTests/src/test/java/stepdefs/DemoDefinitions.java b/CucumberTests/src/test/java/stepdefs/DemoDefinitions.java new file mode 100644 index 0000000..4e086a5 --- /dev/null +++ b/CucumberTests/src/test/java/stepdefs/DemoDefinitions.java @@ -0,0 +1,49 @@ +package stepdefs; + +import cucumber.api.PendingException; +import cucumber.api.java.en.Given; +import cucumber.api.java.en.Then; +import cucumber.api.java.en.When; + +public class DemoDefinitions { + + @Given("^I have a configured cucumber-jvm project$") + public void i_have_a_configured_cucumber_jvm_project() throws Exception { + // Write code here that turns the phrase above into concrete actions + //throw new PendingException(); + } + + @When("^I run it within my IDE$") + public void i_run_it_within_my_IDE() throws Exception { + // Write code here that turns the phrase above into concrete actions + //throw new PendingException(); + } + + @Then("^I will be able to run connected step definitions$") + public void i_will_be_able_to_run_connected_step_definitions() throws Exception { + // Write code here that turns the phrase above into concrete actions + //throw new PendingException(); + } + + @When("^the Maker starts a game$") + public void theMakerStartsAGame() { + } + + @Then("^the Maker waits for a Breaker to join$") + public void theMakerWaitsForABreakerToJoin() { + } + + @Given("^the Maker has started a game with the word \"([^\"]*)\"$") + public void theMakerHasStartedAGameWithTheWord(String arg0) throws Throwable { + // Write code here that turns the phrase above into concrete actions + //throw new PendingException(); + } + + @When("^the Breaker joins the Maker's game$") + public void theBreakerJoinsTheMakerSGame() { + } + + @Then("^the Breaker must guess a word with (\\d+) characters$") + public void theBreakerMustGuessAWordWithCharacters(int arg0) { + } +} diff --git a/CucumberTests/src/test/resource/demo.feature b/CucumberTests/src/test/resource/demo.feature new file mode 100644 index 0000000..0838f11 --- /dev/null +++ b/CucumberTests/src/test/resource/demo.feature @@ -0,0 +1,12 @@ +Feature: Guess the word + + # The first example has two steps + Scenario: Maker starts a game + When the Maker starts a game + Then the Maker waits for a Breaker to join + + # The second example has three steps + Scenario: Breaker joins a game + Given the Maker has started a game with the word "silky" + When the Breaker joins the Maker's game + Then the Breaker must guess a word with 5 characters \ No newline at end of file diff --git a/res/Betterzon.svg b/res/Betterzon.svg new file mode 100644 index 0000000..406b3fa --- /dev/null +++ b/res/Betterzon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/res/Betterzon_3840.png b/res/Betterzon_3840.png new file mode 100644 index 0000000..3fceef8 Binary files /dev/null and b/res/Betterzon_3840.png differ