public ServicedControllerTests() { service = Substitute.For <IService>(); controller = Substitute.ForPartsOf <ServicedController <IService> >(service); controller.ControllerContext.RouteData = new RouteData(); controller.ControllerContext.HttpContext = Substitute.For <HttpContext>(); controller.HttpContext.RequestServices.GetService <ILanguages>().Returns(Substitute.For <ILanguages>()); }
public ServicedControllerTests() { service = Substitute.For <IService>(); controller = Substitute.ForPartsOf <ServicedController <IService> >(service); controller.ControllerContext.RouteData = new RouteData(); controller.ControllerContext.HttpContext = Substitute.For <HttpContext>(); controller.HttpContext.RequestServices.GetService(typeof(IAuthorization)).Returns(Substitute.For <IAuthorization>()); }
public ServicedControllerTests() { service = Substitute.For<IService>(); controller = Substitute.ForPartsOf<ServicedController<IService>>(service); controller.ControllerContext.RouteData = new RouteData(); controller.ControllerContext.HttpContext = Substitute.For<HttpContext>(); controller.HttpContext.RequestServices.GetService<ILanguages>().Returns(Substitute.For<ILanguages>()); }
public ServicedControllerTests() { service = Substitute.For <IService>(); controller = Substitute.ForPartsOf <ServicedController <IService> >(service); controller.ActionContext.RouteData = new RouteData(); controller.ActionContext.HttpContext = Substitute.For <HttpContext>(); controller.HttpContext.ApplicationServices.GetService <IGlobalizationProvider>().Returns(Substitute.For <IGlobalizationProvider>()); }
public ServicedControllerTests() { service = Substitute.For <IService>(); controller = Substitute.ForPartsOf <ServicedController <IService> >(service); ActionContext action = new(new DefaultHttpContext(), new RouteData(), new ActionDescriptor()); context = new ActionExecutingContext(action, new List <IFilterMetadata>(), new Dictionary <String, Object>(), controller); controller.ControllerContext.RouteData = new RouteData(); controller.ControllerContext.HttpContext = Substitute.For <HttpContext>(); controller.HttpContext.RequestServices.GetService(typeof(IAuthorization)).Returns(Substitute.For <IAuthorization>()); }
public ServicedControllerTests() { service = Substitute.For <IService>(); controller = Substitute.ForPartsOf <ServicedController <IService> >(service); }
public void SetUp() { service = Substitute.For <IService>(); controller = Substitute.ForPartsOf <ServicedController <IService> >(service); }
public ServicedControllerTests() { service = Substitute.For<IService>(); controller = Substitute.ForPartsOf<ServicedController<IService>>(service); }