Domanda

What is the difference between NMock and NUnit? I have spent some time Googling this and have found explanations here:

http://blog.yeticode.co.uk/2009/05/nunit-and-nmock/ http://en.wikipedia.org/wiki/NMock http://en.wikipedia.org/wiki/NUnit

However, I am still not clear.

Also the following webpage says: "We now have tutorials!": http://nmock3.codeplex.com/. I cannot find these tutorials. Are there any up to date tutorials available? I found this tutorial: http://msdn.microsoft.com/en-us/magazine/cc163904.aspx. However, after adding the reference to NMOCK3 (using NMock;), I get a compiler error trying to create an instance of DynamicMock: "The type or namespace name DynamicMock could not be found".

I have purchased a book on the subject and it is due to be delivered in a few days.

È stato utile?

Soluzione

NMock is a framework that facilitates the achievement of unit tests, they create simulations data based on interfaces. mock is copy of data based on proxy pattern

Sample : for testing a business layer, and avoid to access the database, to avoid network constraints that are not part of the test, you mock your class of data access.

NUnit is technical layer for performs tests. but with NMock you can complete theses hards cases

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top