Moles behaviors are not included with Fakes in Visual Studio 2012. SharePoint Emulators offer similar functionality, however, System.Web emulators are not public at this time. As a workaround, you can implement emulators with shims.
Behaviour Models in Fake framework
-
07-12-2021 - |
Question
In Visual Studio 2010, here was way to test ASP.NET application with Behaviors.Now, in VS 2012, they have upgrade to Fakes Framework. How do you achieve the same with Fakes?
Creating Fakes assembly for “System.Web” doesn’t create behavior models for “System.Web”. i.e. I can’t find Bhttpcontext
object which use to be there when you moles “System.Web” assembly in “System.Web.Behaviors” namespace.
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow