...snipped from a discussion earlier today with
someone who
should know about C#!
btw, I found one conclusive reason as why to use C# over VB.Net when doing unit tests with NMock
in C# the line is:
Expect.Once.On(mockFetcher).Method("GetDatabases").Will(Return.Value(mockReturnValue));
in VB it is:
Expect.Once.On(mockFetcher).Method("GetDatabases").Will(NMock2.Return.Value(mockReturnValue))
Return is a
NMock2 type as well as (with caps) a VB reserved word! so you have to add a qualifier.
taking into consideration the semicolon that's 6 extra keystrokes!