Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: Can update the test result for cucumb tests
Signed-off-by: Sheng Chen <sheche@microsoft.com>
- Loading branch information
Showing
7 changed files
with
78 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
test/test-projects/junit5/src/test/java/junit5/cucumber/CucumberSteps.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package junit5.cucumber; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import io.cucumber.java.en.Then; | ||
import io.cucumber.java.en.When; | ||
|
||
public class CucumberSteps { | ||
|
||
@When("the client add {int} and {int}") | ||
public void addNumbers(Integer int1, Integer int2) { | ||
} | ||
|
||
@Then("the result should be {int}") | ||
public void checkSumValue(Integer value) { | ||
assertEquals(value + 1, 6); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
test/test-projects/junit5/src/test/java/junit5/cucumber/CucumberTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package junit5.cucumber; | ||
|
||
import io.cucumber.junit.Cucumber; | ||
import io.cucumber.junit.CucumberOptions; | ||
import org.junit.runner.RunWith; | ||
|
||
@RunWith(Cucumber.class) | ||
@CucumberOptions(features = "src/test/resources") | ||
public class CucumberTest {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Feature: The calculator application | ||
Scenario: client wants to add 2 numbers | ||
When the client add 2 and 4 | ||
Then the result should be 6 |