我可以使用Moq和subsonic3吗?(Can I use Moq with subsonic3?)

编程入门 行业动态 更新时间:2024-10-24 14:20:11
可以使用Moq和subsonic3吗?(Can I use Moq with subsonic3?)

我想在我的最新项目中使用模拟框架和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.

更多推荐

本文发布于:2023-07-19 09:14:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1176935.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:可以使用   Moq

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!