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>());
        }
Esempio n. 2
0
        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>());
        }
Esempio n. 4
0
        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>());
        }
Esempio n. 5
0
        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>());
        }
Esempio n. 6
0
 public ServicedControllerTests()
 {
     service    = Substitute.For <IService>();
     controller = Substitute.ForPartsOf <ServicedController <IService> >(service);
 }
Esempio n. 7
0
 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);
 }