I stumbled across The Art of Unit Testing by Roy Osherove while researching Mock Object frameworks that can be used with ASP.NET MVC. Even though the author is still in the process of writing the book, you can download an early draft of this book at http://www.manning.com/osherove/.
This is a fantastic book for learning about Mock frameworks such as Rhino Mocks. One of the nicest features of the book is the author’s clearly worded definitions of many terms that you encounter when working with Mock object frameworks. For example, the book contains a valuable section that distinguishes between Stubs and Mocks. He also provides clear explanations of different techniques for performing Dependency Injections and creating Seams.
The book concentrates on Rhino Mocks. He delves into the gritty details of how and when to use Rhino Mocks to simulate objects. He provides walkthroughs that demonstrate how to use Rhino Mocks to test whether expected object methods have been called, expected object properties have been set, and expected object events have been raised.
The book also has a useful section that compares the different Mock Object frameworks. He compares NUnit.Mocks, NMock, NMock2, Type Mock, and Rhino Mocks (This section convinced me that I need to check out Type Mock).
Even though the book is not finished, I already found it to be extremely useful. As far as I know, it currently is the only book that compares different Mock Object frameworks available in the .NET universe.
Sounds good,
I should give it a try. I put Mocking aside as soon as I learnt about NMock. Does this book introduce a fully typed, compile-time-checked way of mocking?
Thanks
@Paymon,
Yes for Rhino Mocks. Roy Osherove does a good job of discussing the issue that you raise. With Rhino Mocks, you setup expectations by calling the actual methods of the object that you are mocking and not by passing a string parameter that represents the method (as you would with NUnit.Mocks).
This is a pretty useful tool. It needs a little tweaking, but I like this better than my NAnt solution I did recently.
Ya really very useful book. Thanks for sharing.
rwe rwer I tried to mock a call to a Linq to SQL query, but I am struggling.
i like this very much
I have some spermlinks I would like to share with you. It’s the story of how my colleague got the MVC HtmlHelper stuck up his pooper while trying to make a nested loop in the back of his head. I know this will be of great value for you for further editions of ASP.NET MVC.
psychology degree | education degree | online degree program
Thanks for all the great input Stephen. I have tried to use a lot of the architecture you have outlined on MvcCms. We are nearing out first release and would appreciate any feedback on how we might improve the initial architecture. The source is available on codeplex at mvccms.codeplex.com
business administration degree | life experience degree
Ishould give it a try. I put Mocking aside as soon as I learnt about NMock.
prk vs lasik
asbestos surveys
mmj It looks like DataContextExtensions.cs line 45 of the Save method should pass the primaryKeyName through to Update.
selam hi This sounds fascinating sıcak sohbet I’m going to read that tracing articlekısa aşk şiirleri when I have a moment.
Wow. erotik film izle is
şifalı bitkiler zayıflama de
çet sohbet fer
netlog ger
müzik dinle err
şarkı dinle
cüneyt arkın filmleri kk
isyan sözleri fer
hikayeler er
islami çet ff
adet sancısına ne iyi gelir hh
escort bayanlar der
bedava chat dd
chat odaları der
liseli kızlar derf
kızlarla sohbet fder
kızlarla chat
sohbet errVVV
really a nice articles, keep it up