Just embarking on using a test framework for writing unit tests and also the TDD approach. Not having any prior experience felt it would be good to go for XUnit although NUnit was the best alternative. Trying to transpose the MS Unit testing methods that I have been looking at in the MVC books I have, to XUnit equivalents and am already stumbling.
Specifically the following: Testing list of entries for a view collection like Index:
CollectionAssert.AllItemsAreInstancesOfType((ICollection)result.ViewData.Model,typeof(MyObject)); (from MVC unleashed book)
How would you do this in XUnit or can't it be done like this?
What puts me off is the lack of documentation for XUnit and am wondering if NUnit is better option.........
Also it appears that the testing code is almost its own language. Would it be fair to say that there is a common set of tests that can be run for all projects?
Regards to TDD..I understand the concept but are the tests themselves the same as unit tests in what they contain and are testing? Not sure what the actual difference is apart from when they get written!