MVC Unit Testing
I have been checking out how to unit test MVC2 web app. Found Ninject.
Ninject is a dependency injection framework like RhinoMock, Moq. It enables you to unit test your code by injecting mock object at run-time. Nice feature as it is light-weight and no xml dependencies writing.
Git-ting Ninject is a pain
Navigated to Ninject MVC Extension source file on github using browser window. You should see a bunch of source code folders. Navigate into mvc2.
You have to use the git client to download, compile the web.mvc library. Not good. Me no like git-ting.
I gave up on the git-ting task after sometimes. Then I found out binaries could be downloaded from github TeamCity build server. Hurray!! No build!! :)
Where to download the binaries?
Click on this link Ninject web mvc2 and login as guest. Click on the artifact link and you should see the binaries.
Unzip and reference the Ninject.dll and Ninject.Web.Mvc.dll in visual studio. Voila! You are ready to Ninject.