VB User Group Talks Summary
Yesterday I gave two talks to the VB User Group, about TDD and Rhino Mocks. I had a lot of fun, and got to embarrass myself in public, trying to code in VB. (When I need to ask the crowd for the array literal syntax, in the middle of the lecture,that is trouble...)
There were a lot of interesting questions, and I got to see how mocking tests would look like in VB.Net. A lot of the methods names in Rhino Mocks are reserved words in VB.Net, which surprised me, because I got VB.Net code from people using Rhino Mocks, and I never noticed that...
Apparently you get code like this:
smsSender.SendSms(Nothing, Nothing) LastCall.[Throw](new Exception()).Constraints([Is].Equals("oren"), [Is].Anything())
Code & Presentations (in PDF format) can be found here.
Comments
Hi,
My functions are inside a very old - production !! - Legacy code -executable in vs2003 ( vb.net ).
I have started a new C# project (.net .1.1) and tried to reference the exe in order to add some unit testing to this monster but it seems that i can't reference an exe in vs2003 !!!
moving functions out of the main project is probably out of the question right now (so does migrating to vs2005).
Is there a way to hook mbunit (or any other unit testing platform) to an vs2003 exe ?
Yes,
You can rename the exe to a dll, and then it will work
Thanks Oren,
I've done some googling and found this :
http://codebetter.com/blogs/darrell.norton/archive/2004/02/16/7354.aspx
in darrell norton's blog (check out the comments)
seams like I'm not the only one that had / has this problem (the post regards nunit but the problem is that same)
anyway renaming the exe to dll over and over again kinda misses the whole idea (at least for me)
i have decided to start by moving the logic of the new screens to a different project (DLL) hopefully it will not force me to migrate large portions of the code :)
Thanks again
Comment preview