4 ms·
I know these test names might seem insane. And I personally hate the Java FactoryFactory culture of over-engineering. But, the super long test class names are
by robrenaud 14y ago
I know these test names might seem insane. And I personally hate the Java FactoryFactory culture of over-engineering. But, the super long test class names are actually pretty nice. I've personally never gone quite that crazy with the names, but I have definitely used more than 80 characters total for the class and particular function named for a test.
These super long names not part of any client interface, no one is ever going to have to type that monstrosity except for the guy writing the test. But when you see the failing test output that prints the test name, you already know what is failing.
You can have a small class name and a (comparatively) long comment, or just a long class name. Considering there is now no need for a comment and the test name is actually useful for debugging failed tests easily (you don't need to "dereference" the short test failure name to get the surrounding comment), this style is actually a win.