qq_31456051
qq_31456051
2017-04-30 14:14

C# 单元测试 上下文上下文上下文

10
  • c#
  • 测试
  • 单元测试

C# 单元测试 如何测试上下文:例如Excel导出代码:
......
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.Charset = "utf-8";
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName + ".xls");
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;
HttpContext.Current.Response.ContentType = "application/ms-excel";
HttpContext.Current.Response.Write(strb);
HttpContext.Current.Response.End();
如何测试代码

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答