加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net-mvc – 路由测试ASP.NET MVC4

发布时间:2020-12-16 04:12:29 所属栏目:asp.Net 来源:网络整理
导读:我一直在使用MvcRouteUnitTester( codeplex和 nuget)对我的路线运行自动单元测试.品味它能做什么: // assert incoming routetester.WithIncomingRequest("/Foo").ShouldMatchRoute("Foo","Index");tester.WithIncomingRequest("/Foo/Index").ShouldMatchRou
我一直在使用MvcRouteUnitTester( codeplex和 nuget)对我的路线运行自动单元测试.品味它能做什么:
// assert incoming route
tester.WithIncomingRequest("/Foo").ShouldMatchRoute("Foo","Index");
tester.WithIncomingRequest("/Foo/Index").ShouldMatchRoute("Foo","Index");

// assert outgoing route
tester.WithRouteInfo("Foo","Index").ShouldGenerateUrl("/Foo");

它工作得很好……当它工作时.它doesn’t work well with MVC4并且很长时间没有更新.

是否有与最新MVC一起使用的替代工具,并得到积极支持?

解决方法

你有没有看过MVC 4的分叉版本?

MVC Route/URL Generation Unit Tester

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读