GildedRose-Refactoring-Kata/Java-Cucumber
2021-10-11 08:58:34 +05:30
..
gradle/wrapper Added Java-Cucumber 2021-10-10 11:02:16 +05:30
src Simplified the scaffolding 2021-10-11 08:58:34 +05:30
.gitignore Added Java-Cucumber 2021-10-10 11:02:16 +05:30
build.gradle Added Java-Cucumber 2021-10-10 11:02:16 +05:30
gradlew Added Java-Cucumber 2021-10-10 11:02:16 +05:30
gradlew.bat Added Java-Cucumber 2021-10-10 11:02:16 +05:30
README.md Added Java-Cucumber 2021-10-10 11:02:16 +05:30

Added cucumber for running the tests and added the lines written in the specification as is in this.

The cucumber feature file example is somewhat like:

src/test/resources/GildedRose.feature

Feature: Gilded Rose quality
  I want to know if the quality is updated properly

  Scenario: Sellin and Quality decreasing
    Given for "+5 Dexterity Vest" initial sellin is 20 and quality is 30
    When I update the quality
    Then I should get sellin as 19 and quality as 29
  ...

And the result is shown as:

$ ./gradlew cucumber

> Task :cucumber

Scenario: Sellin and Quality decreasing                                # src/test/resources/GildedRose.feature:4
  Given for "+5 Dexterity Vest" initial sellin is 20 and quality is 30 # com.gildedrose.StepDefinitions.initial_sellin_is_and_quality_is(java.lang.String,int,int)
  When I update the quality                                            # com.gildedrose.StepDefinitions.i_update_the_quality()
  Then I should get sellin as 19 and quality as 29                     # com.gildedrose.StepDefinitions.i_should_get_sellin_as_and_quality_as(int,int)

1 Scenarios (1 passed)
3 Steps (3 passed)
0m0.376s



BUILD SUCCESSFUL in 2s

Note: If you want to decrease update the quality twice, just repeat the line "When I update the quality" twice in the feature file.