Enhancing a test and getting another pass
What happens if a test that expects an exception does not see the exception? That should be a failure, and we’ll handle it next. This situation is a little different because the next pass is really going to be a failure.
When you’re writing tests and following the guidance to first do the minimum amount to get a first passing result and then enhancing the test to get another pass, you’ll be focused on passing. That’s good because we want all the tests to eventually pass.
Any failure should almost always be a failure. It doesn’t usually make sense to have expected failures in your tests. What we’re about to do here is a bit out of the ordinary and it’s because we’re still developing the test library itself. We need to make sure that a missing exception that was expected and did not occur is able to be caught as a failed test. We then want to treat that failed test as a pass because...