Watch previous videos:

 

//TestReviewUnity.mp4

 

 

In this video I go over the tests for Microsoft Unity Application Block.

Overall the quality of the tests in Unity is pretty good! I could certainly recommend that people look at them as examples of a bunch of tests against a framework, which are mostly very readable and maintainable.

Things I walk through:

  • Using [Ignore]
  • exploration testing
  • magic numbers and strings
  • un-needed asserts
  • Stub hard coded behavior
  • handling config files in tests
  • Asserts hidden in a utility method
  • more naming conventions
  • Separating integration tests
  • “smart” code that is less readable
  • Meaningless “isNotNull” tests
  • cleaner ways of expecting exceptions

Geeky T-Shirt ideas

Test Review #2 – ASP.NET MVC Unit Tests