views:

85

answers:

1

Hi,

I'd like to use a mocking framework as well as an IOC framework with my latest project, based on subsonic 3 (ActiveRecord) and ASP.NET MVC.

I'd like to use Moq for mocking and Castle-Windsor for IOC.

Anyone got any advice or recommendations based on these choices? Any bumps in the road I should be aware of?

Chris

A: 

I would definitely look into the Castle Windsor controller factory in MVC Contrib if you're using Castle for IOC with a ASP.NET MVC app.

Since Moq is completely separated from the app itself in the testing part of the code, I can see no reason that there would be any bumps in the road. I've been using Moq with a couple ASP.NET MVC apps with Castle Windsor IoC and on a app where I used Subsonic (though not in an ASP.NET MVC app) and have no complaints.

bingle
That's good to hear. I KNOW that Moq and CW are supported in the MVC framework, based on Steven Sanderson's Excellent book, "Pro ASP.NET MVC Framework". My question was more related to if there are any known issues with using Subsonic3 with Moq and CW. I prob should have made that more clear. Are you using Subsonic v2 or v3? ActiveRecord?
wchrisjohnson
I was using Subsonic v2. I honestly can't imaging any scenario where there would be issues with Moq and Subsonic where there wouldn't be with any other common mocking framework. It's not like they have to integrate or anything. I guess what I'm saying is they're concerned with such different parts of your app, I wouldn't worry about it.
bingle