Well, I told you kids before I was ready for some action. In this DoubleDawg video, we roll our first couple of tests. They’re not thorough tests, they’re just a couple of quick tests that will serve as evidence we haven’t ruined the system in our first few refactorings.
There are at least three lessons in here:
- Know your tools.
- Write new-to-you tests by starting with an assert.
- It’s possible in many situations to get away with no code-study and empty arguments.
Get the Flash Player to see this player.
Our code after this video (87)
[...] not be to extract the do_replacement helper method. I noticed GeePawHill do that too during his Double Dawg Dare refactoring videos; so it’s common, and a couple of years ago I was doing it all the time. But recently [...]
One of the down sides of long class names:
I just noticed that our
AnnotationConfigurationValidationBuilderTest class tests the
AnnotationValidationConfigurationBuilder class.
I think I’ll rename the test class to be
AnnotationValidationConfigurationBuilderTest.