Tag Archives: Testing

The Browser Wars and UI Testing

I just did something that I’ve been putting off for a long time: I switched to FireFox. I’d been a longtime Opera fan and I kept hoping that the sites I use would start to support it better, but that didn’t happen and Internet Explorer 7 came out with tabbed browsing, so I couldn’t justify [...]

Leave a comment

Loose expectations with NMock2

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 [...]

Leave a comment