- [Narrator] Now I can finish the job…by using the same logic to continue implementing steps.…Back inside of our card minimum feature,…we have one scenario, that the total charge is…over the $2 credit card minimum.…Well, we have another scenario that…our three amigos came up with.…Copying and pasting this inside of the same feature file,…we can state that we'd like to set up a scenario…where the total charge is under the $2 credit card minimum.…
We could say, given that Maria orders $1 of coffee from Li,…when Maria pays with a credit card,…then Li should not process the payment.…Notice that our given and when statements…are the same for both of our scenarios,…meaning that we've already implemented…two of the step definitions that we need.…Running Cucumber, it shows that…we only have one undefined step.…Then, I can copy and paste this into my step definitions.…
Now, I can start making assertions about…what I would expect in this converse situation.…I can simply copy and paste the…expect statement from above.…And here, I can now expect that…
Released
8/17/2018- What is behavior-driven development?
- Agile and BDD
- BDD examples
- BDD frameworks
- Defining scenarios
- Domain modeling
- Enforcing object-oriented design
- BDD process: Behavior before function
Share this video
Embed this video
Video: Add a second scenario