You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to suggest making the base path for Http.Context.Current.Server.MapPath configurable. Currently it is always set to AppDomain.CurrentDomain.BaseDirectory and cannot be changed.
Motivation:
The standard use case for FakeHttpContext is to create unit tests for web applications. The unit test project is usually separated from the web application project, so that they reside in different project directories. For successfully faking a web request, the MapPath would need to have the path that an actual web request to the web application directory would have not to the unit test Debug\bin directory.
The text was updated successfully, but these errors were encountered:
Hi @hannobo, not sure that I completely understand why do you need this, as this util is for unit testing, where you don't need to create any requests, but I've implemented what you need.
I'd like to suggest making the base path for
Http.Context.Current.Server.MapPath
configurable. Currently it is always set toAppDomain.CurrentDomain.BaseDirectory
and cannot be changed.Motivation:
The standard use case for FakeHttpContext is to create unit tests for web applications. The unit test project is usually separated from the web application project, so that they reside in different project directories. For successfully faking a web request, the MapPath would need to have the path that an actual web request to the web application directory would have not to the unit test Debug\bin directory.
The text was updated successfully, but these errors were encountered: