我想在我的最新项目中使用模拟框架和IOC框架,基于亚音速3(ActiveRecord)和ASP.NET MVC。
我想使用Moq进行嘲弄,使用Castle-Windsor进行IOC。
有人根据这些选择得到任何建议或建议吗? 我应该注意路上的任何颠簸?
克里斯
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
最满意答案
如果你使用带有ASP.NET MVC应用程序的IOC城堡,我肯定会看看MVC Contrib中的Castle Windsor控制器工厂。
由于Moq在代码的测试部分与应用程序本身完全分离,我认为没有理由在路上会出现任何颠簸。 我一直在使用Moq与Castle Windsor IoC的几个ASP.NET MVC应用程序以及我使用Subsonic的应用程序(虽然不在ASP.NET MVC应用程序中)并且没有任何抱怨。
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.
更多推荐
发布评论