Naming Test Methods

When I first started writing unit tests, I followed the common convention in C# for method naming:


Later, I adopted the convention of separating words with underscores:


At some point I figured the approach above makes the name of the method look like the title of an article. I then decided to go with the same approach, but making everything lower case:


In some cases, I may use uppercase if I want to draw attention to something in particular:


I like when the code is calm to look at, and it draws my attention to things as appropriate.


  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: