This project is read-only.

What's the appropriate naming macro for this unit test?

Jul 8, 2011 at 12:31 PM

Hi Herman,

I guess in your case you should have only one macro:

It will ensure that any unit test name:

  • contains exactly 3 parts separated by underscore
  • in each part there are PascalNames

So, the following will fail:


and the following will pass:

Validate_Url_Empty (as a side effect, but it seems OK)


Moreover, if you have limited number of "expected behaviour", you could even make something like this:

... which will make your naming even more strict.

Good luck!

Best regards,
Oleg Shuruev

Jul 8, 2011 at 12:35 PM

Just some clarifying.

With $(AaBb)_$(AaBb)_$(AaBb) the following will not pass:

public void Validate_Url_Empty_Argument_Exception_Thrown()

If you want to allow it too, you should also add $(Aa_Bb) as a separate line (in rule definition).
Hope that makes it more clear.

Best regards,
Oleg Shuruev