mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2026-04-26 23:30:11 +00:00
BETTERZON-21: Adding Cucumber Framework
This commit is contained in:
@@ -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 {
|
||||
}
|
||||
@@ -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) {
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user