How to mock application path when unit testing Web App

后端 未结 6 1352
囚心锁ツ
囚心锁ツ 2021-01-04 12:35

I am testing code in a MVC HTML helper that throws an error when trying to get the application path:

//appropriate code that uses System.IO.Path to get direc         


        
6条回答
  •  时光取名叫无心
    2021-01-04 13:15

    This happens once you login to the application and you try to add any new url to the http context and trying to create SimpleWorkerRequest.

    in my case i have an url to get the documents from remote server and added the url to http context and trying to authenticate the user and create the SimpleWorkerRequest.

提交回复
热议问题