有人可以告诉我如何使用Moq创建一个模拟的HTML Helper吗?
这个article有一个链接到声称描述这个的文章,但是链接后只返回一个ASP.NET运行时错误
[编辑]
我问了一个更具体的问题相同的主题here,但它没有得到任何回应。我认为它太具体,所以我想我可以得到一个更一般的答案一个更一般的问题,并修改它,以满足我的要求。
谢谢
解决方法
你能做的是:
HtmlHelper helper = null; helper.YourHelperMethod();
不需要模仿任何东西。为我工作辉煌。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。