Currently all of our tests are trustworthy enough.
So what to do next?
Let's again switch over and take a look at the booking method to see what else is missing there.
Here in cancel booking in that method, let's check if it's complete.
Right.
So what's missing here?
What about the booking list of the flight?
What should happen to that when you cancel the booking?
The booking should for sure be removed from the booking list when you cancel it.
How do you test it?
Well, the booking list should no longer contain the canceled bookings then.
So this is the scenario When I cancel a booking, the booking should no longer exist inside of the booking
list.
And there are also other scenarios that you can think of.
You can either look at the production code to discover new scenarios or what if analyze the scenarios
you have already discovered.
You can use sticky notes to what if analyze and discover them as we have done it right here.
What if I book two seats but only cancel one of them?
What if I book one seat, but cancel two?
You don't necessarily need to look at the production code to discover new scenarios.
You can alternatively, what if analyze the existing scenarios to discover new ones while discovering
new scenarios.
You can use sticky notes to visualize them while thinking.
Remember to keep an eye on the three laws of TDD while following the workflow.
Congratulations.
We are at the end of the fourth chapter of the course.
In this chapter, you have learned how you can discover new scenarios.
You also learned about the three laws of TD and you solved them in practice.
So far we have learned how to test a single class.
But that's not enough.
The application should be tested at a higher level as well.
For example, we need to have tests for whether an entity gets updated in the database or not.
And in the next chapter we will start implementing the flight service by the guide of tests.
So as always, stay tuned and see you in the next chapter just in a second.