It is recommended that you choose a consistent naming convention for your tests, as it makes the results a lot easier to analyze. There are a number of approaches used for unit test naming. We will choose a popular naming convention described at http://osherove.com/blog/2005/4/3/naming-standards-for-unit-tests.html. Generally, the naming convention suggests that the unit test name should be comprised of the following:
[UnitOfWork_StateUnderTest_ExpectedBehavior]
Let's explore all the parts of the naming structure:
- UnitOfWork: This is the unit under test, such as a class or method.
- StateUnderTest: This is the requirement being tested. For instance, a description of the specific "type" of input parameters provided in this ...