PleaseDoNotNameYourTest�CasesLikeThis
@alexJamesBrown
github.com/alexJamesBrown
Alex Brown
y tho
HardToReadWhenTheMethodNameGetsLongerThanAFewWords
Too Similar to ‘real’ method names
Navigation through IDE is a pain
Grammatically difficult to understand intent
DidIMentionTheyAreReallyHardToReadWhenTheyAreLong
There is of course (slightly) worse...
public void Test1()
public void Test2()
public void Test3()
A better way
UnitOfWork_StateUnderTest_ExpectedBehavior
Credit: Roy Osherove
Action_Arrangement_Assertion
y tho
Obviously_LotsEasier_ToRead
Clear separation of what is under test, with what parameters, and what we expect to be the outcome
Navigation through IDE is a breeze
Nothing like your ‘production’ code �(I would hope!)
Further Reading
tiny.cc/test_case_names