May 27, 2009

What is a good unit test

A unit test should have the following properties:

  1. It should be automated and repeatable.
  2. It should be easy to implement.
  3. Once it’s written, it should remain for future use.
  4. Anyone should be able to run it.
  5. It should run at the push of a button.
  6. It should run quickly.

May 3, 2009


Be default, your page does not implement IRequireSessionState, so your page should not be able to access HttpContext.Current.Session. But why you can always use that it? It is because the compiler and code generator modify your page to support the interface, so you don't need to explicitly implement this interface your page.