Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
You are naming your tests wrong (enterprisecraftsmanship.com)
3 points by todsacerdoti 6 months ago | hide | past | favorite | 3 comments


The article doesn't even mention my favorite convention:

    test()
    FinalTest()
    FinalTestCheck()
    FinalTestCheck_dontuse()
    FinalTestCheck_dontuse_WorkingFix()


What would happen if we inverted the order? If we started with a good test name, descriptive of the behavior under test, and named the things being tested based on the test name.


tenPlusTwentyIsThirty() for the win. No need to name the test article in the test method because you build that into the name of the test class.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: