Therefore, names tests in one of the following formats:
public class <SystemUnderTest>Tests
{
// seperated by underscores
[Test]
public void <SubsystemUnderTest>_<PostCondition>()
{...}
// or
[Test]
public void <SubsystemUnderTest>_<PreCondition>_<PostCondition>()
{...}
}
For a unit test, the <SystemUnderTest>
should be the class name, and the <SubsystemUnderTest>
should be the method name.
[Test]
public void HazardLightsTest()
{...}
[Test]
public void HarzardLightsToggle_WhenLightsAlreadyBlinking_BlinkingShouldStop()
{...}
If you are having difficutly naming your test this way, it might indicate it is doing too much and should be split into more granular tests.