That failing test about “remember to close DbItems” was nothing short of wonderful. What a delightfully empathic thing of Past Duncan to have done, in order to help out Future Duncan. ❤
Thank you. As I hadn’t rehearsed this session, my surprise at the failing test was genuine. To be honest though, I doubt whether the time spent writing that test was actually worthwhile. The consequences of leaving a class open are hardly severe, and it’s telling that the name of the test got out of sync because it was an identifier that wasn’t updated in a refactoring. So maybe the takeaway should be - you can use tests to maintain code structure invariants, and you can set up tests to let you know when an event has occurred.
But turns out the program is irrelevant, so we can just delete the whole program. It's now much easier to maintain, and takes much less time to compile.
That failing test about “remember to close DbItems” was nothing short of wonderful. What a delightfully empathic thing of Past Duncan to have done, in order to help out Future Duncan. ❤
Thank you. As I hadn’t rehearsed this session, my surprise at the failing test was genuine.
To be honest though, I doubt whether the time spent writing that test was actually worthwhile. The consequences of leaving a class open are hardly severe, and it’s telling that the name of the test got out of sync because it was an identifier that wasn’t updated in a refactoring.
So maybe the takeaway should be - you can use tests to maintain code structure invariants, and you can set up tests to let you know when an event has occurred.
But turns out the program is irrelevant, so we can just delete the whole program. It's now much easier to maintain, and takes much less time to compile.
Luckily Alison has re-upped our contract, so we know she wants the functionality we have delivered.