Pages

Thursday, November 05, 2009

Refactoring in VB.Net

Unit testing and refactoring is becoming a real pain in VB.Net. First, Moq can not be utilized properly in VB.Net v9 because the language does not support all the Lambda syntax features and it is not possible to have a function (Sub) that does not return a value. Hence, it is impossible to unit-test method calls that do not return a value or, in VB.Net slang, Subs are not unit-testable while Functions are.

Another painful thing is that Refactor features, available with C# in Visual Studio, are not available for VB.  The good thing is that there is a plugin by Developer Express Inc. available for free from MSDN.

Refactor! for Visual Basic 2008

No comments: