Naming Style of my Test Methods is changing…
Long back, I’ve moved away from naming my test methods as test<something> to should<do_something>.
1 2 3 4 | @Test public void shouldIgnoreDuplicateDocuments() { ... } |
For the last year or so, I’ve moved away from the “should” naming conversion as well. These days my tests look like:
1 2 3 4 | @Test public void ignoreDuplicateDocuments() { ... } |
More examples:
1 2 3 4 | @Test public void removeDocumentsBasedOnName() { ... } |
From a Domain Forwarding server code:
1 2 3 4 | @Test public void redirectDomainsWithSubDomainsAndPathPermanently() { ... } |
To think about it the “should” just seems redundant and lots of times gets in the way of freely expressing what behavior you are trying to drive.