VB.NET Mock Object Framework

140 views
Skip to first unread message

Matt R

unread,
Jan 13, 2010, 9:35:34 AM1/13/10
to Test Driven Development
Has anyone found a good mock object library for VB.NET? I've tried
Rhino Mocks, NMock2 and Nunit.Mocks. I love Rhino Mocks, but can't
use it effectively because of the compiler issue trying to mock Sub
Methods (as opposed to Functions):

http://ayende.com/Blog/archive/2007/10/26/Rhino-Mocks-killed-Visual-Basic.aspx

I also used NMock2 for a time, but ran into an issue where the
assembly wasn't strong-named; therefore, I couldn't use it to test my
strong-named production assembly. I also didn't like having to define
the method name as a string -- because I lost compile-time support if
I needed to refactor (rename the method).

So, today I use NUnit.Mock. It works for basic scenarios, but I also
have the issue of using strings to specify my mocked methods. I
haven't tried Moq, but heard that it has the same compiler issue as
Rhino Mocks.

http://groups.google.com/group/moqdisc/browse_thread/thread/db59f09611292967

So, for those of you that are VB.NET TDD folks, what do you recommend
as a good Mock Object framework?

Thanks,
Matt

Chris Bingham

unread,
Jan 13, 2010, 10:22:20 AM1/13/10
to test-driven...@googlegroups.com
I'm not a VB.Net Guy so i dont know much about this, but perhaps have a look at typemock

http://site.typemock.com/vbpage/2009/9/10/unit-testing-vbnet.html

2010/1/13 Matt R <mr...@theringworx.com>
--
You received this message because you are subscribed to the Google Groups "Test Driven Development" group.
To post to this group, send email to test-driven...@googlegroups.com.
To unsubscribe from this group, send email to test-driven-devel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/test-driven-development?hl=en.




Reply all
Reply to author
Forward
0 new messages