This is intended as a quick Java test naming convention.
Method name template.
<unit-of-work>[WHEN<state-under-test>]THEN<expected-behaviour>
Javadoc template.
/**
* <unit-of-work-description>
*
* Given: <preconditions>
* When: <state-under-test>
* Then: <expected-behaviour>
*
* @author <author>
*/
Example:
/**
* Always return true method test.
*
* Given: Library is instantiated
* When: Simple call
* Then: Success
*
* @author Giovanni Farfán B.
*/
@Test
public void alwaysReturnTrueWHENsimplecallTHENsuccess() {
Library lib = new Library();
assertTrue("should return 'true'", lib.alwaysReturnTrue());
}