Ejemplo n.º 1
0
        public static PropertyChecksController GetInitialisedChecksController(IPropertyCheckService checkService)
        {
            var controller = new PropertyChecksController(checkService)
            {
                Request = new HttpRequestMessage { RequestUri = new Uri(Url) },
                Configuration = new HttpConfiguration()
            };

            controller.Configuration.MapHttpAttributeRoutes();
            controller.Configuration.EnsureInitialized();

            return controller;
        }
 public void Setup()
 {
     _checksController =
         ControllerHelper.GetInitialisedChecksController(_mockChecksService.Object);
     AutoMapperConfig.Bootstrap();
 }