NMock2 will have a verification failure if all expected calls are not made and if any unexpected calls are made. That last bit can make writing test code rather tedious.
I have a presenter and I’m testing its normal path using a bunch of calls like the following:
…
Expect.Once.On(view).GetProperty(”Name”).Will(Return.Value(”Widget”));
Expect.Once.On(view).GetProperty(”Quantity”).Will(Return.Value(3));
Expect.Once.On(view).GetProperty(”Price”).Will(Return.Value(9.95m));
Expect.Once.On(view).Method(”ShowTotal”).With(29.85m);
…
That’s all good, but now I want to test [...]
Categories
Tags
AdSense AdWords AJAX ASP.net css Eclipse FCKEditor FireFox Google ISAPI_Rewrite NMock PHP RadRails Ruby on Rails Symfony Testing Umbraco XSL-
Recent Posts
Coady Family PhotosBookshelf: Fiction
Bookshelf: Non-fiction
-
Recommended Web Host
Since 1997, Parcom has been offering high quality web site hosting from only 99 cents per month!
- ASP.net 2/3, PHP 4/5
- SQL Server 2005, MySQL 5
- Fast & Reliable