lunedì 1 novembre 2010

UnitTests' naming

I'm considering a rename for the 400+ unit tests of the DDDSample implementation I'm building for Epic.NET.

I've found differents approaches:

  1. Roy Osherove's MethodName_StateUnderTest_ExpectedBehavior
  2. Steve Sanderson’s subject_scenario_result
  3. Google Testing's verbosily describing a responsibility of the object

Theorically speaking I think that they should all converge when applied to a domain model that expose an ubiquitous language.

Still I need to think a bit more about the best convention to adopt.

The worse problems relates to complex pre condition, multiple postconditions and events.

Nessun commento:

Posta un commento