Last active
July 24, 2020 23:53
-
-
Save Ajwah/7862c8b40137666fa3808d7bcb7fdda2 to your computer and use it in GitHub Desktop.
Proposal: PBT BDD
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
@hp | |
Property: HP | |
HP stands for health points and denotes whether an entity is alive or | |
dead. | |
@valid | |
Given HP | |
When valid | |
Then it must be a natural number | |
And greater than or equal to 0 | |
And less than or equal to 100 | |
@entity | |
Property: Entity | |
Entity stands for any character; friend or foe | |
@an@another | |
Given an entity | |
Then it can be any of below: | |
|Hero| | |
|Damsel in distress| | |
|Monster| | |
@dead@died | |
Given an entity | |
When dead | |
Then it has 0 @hp | |
Scenario Outline: Every @entity shall inevitably die | |
Given I have @an @entity: A with @valid @hp | |
And I have @another @entity: B with @valid @hp | |
When A strikes B | |
Then the @hp of B will decrement by 1 | |
And B will continue to be struck until it has @died |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment