public void SetUp() { service = Substitute.For <IService>(); controller = new ServicedControllerProxy(service); controller.ControllerContext = Substitute.For <ControllerContext>(); controller.ControllerContext.HttpContext = new HttpMock().HttpContextBase; }
public void ServicedController_SetsService() { controller = new ServicedControllerProxy(service); IService actual = controller.BaseService; IService expected = service; Assert.AreSame(expected, actual); }
public ServicedControllerTests() { service = Substitute.For <IService>(); controller = Substitute.ForPartsOf <ServicedControllerProxy>(service); }