コード例 #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);
 }