Using httpcontext in unit test

后端 未结 4 822
终归单人心
终归单人心 2021-02-13 14:44

I\'m using C#4.0 and i need to unit test a service. The function inside the service returns a path similar to the variable i called expected, this is the path i\'m expecting to

4条回答
  •  遇见更好的自我
    2021-02-13 15:06

    You can try looking at the attributes created for ASP.Net unit testing, like

    [HostType("ASP.NET")]
    

    This link to MSDN has quite a good write-up about it

提交回复
热议问题