Пример #1
0
 public void SetUp()
 {
     service    = Substitute.For <IService>();
     controller = new ServicedControllerProxy(service);
     controller.ControllerContext             = Substitute.For <ControllerContext>();
     controller.ControllerContext.HttpContext = new HttpMock().HttpContextBase;
 }
Пример #2
0
        public void ServicedController_SetsService()
        {
            controller = new ServicedControllerProxy(service);

            IService actual   = controller.BaseService;
            IService expected = service;

            Assert.AreSame(expected, actual);
        }
Пример #3
0
 public ServicedControllerTests()
 {
     service    = Substitute.For <IService>();
     controller = Substitute.ForPartsOf <ServicedControllerProxy>(service);
 }