Testing Castle windsor Component with PerWebRequest lifestyle

后端 未结 4 2029
夕颜
夕颜 2020-12-31 02:00

I\'m trying to do some testing with castle windsor involved, in one of my tests I want to check the windsor installers, so I check that the container can resolve my componen

4条回答
  •  [愿得一人]
    2020-12-31 02:51

    If you also want to check if the type of scope is per web request you could also do this

    var isPerWebRequestScope = JsonConvert.SerializeObject(model.ExtendedProperties).Contains("Castle.Facilities.AspNet.SystemWeb.WebRequestScopeAccessor")
    

提交回复
热议问题