|
From: Nick R. <nic...@fr...> - 2004-02-11 19:03:28
|
Hi,
I am wondering what peoples thoughts are on commentable Verify calls to the
mock object? It seems I sometimes feel a little more information would be
extremely beneficial, especially if more than one mock object is involved in
a set of object messages:
[Test]
public void SelectCategory()
{
_view.Expect("SetCategories", _computers.SubCategories);
_categoryProviderMock.ExpectAndReturn("Find", _computers.SubCategories,
"Computers");
_controller.SelectCategory("Computers");
_view.Verify("The controller has not called back into the view");
_categoryProviderMock.Verify();
}
In this instance, albeit simple, the message goes a long way in explaining
the failure better to the reader (at least I think so).
Just curious...
nick.robinson
site : www.fromconcept.co.uk
blog : www.fromconcept.co.uk/weblog.aspx
|