摘要:
在ASP.NET MVC中测试Controller时,常常需要在Controller中访问上下文,比方说查询字符串或者form中的内容,而我们测试的时候一般不是在web运行环境下的,所以我们需要做些工作去模拟上下文。Controller中代码如下Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->public ActionResult Index() { ViewData["Message"] = Request.QueryS 阅读全文
posted @ 2011-02-25 15:21
番茄的梦想
阅读(517)
评论(0)
推荐(1)
浙公网安备 33010602011771号