public void Setup()
 {
     _propertiesController =
         ControllerHelper.GetInitialisedPropertiesController(_mockPropertyService.Object);
     AutoMapperConfig.Bootstrap();
 }
        public static PropertiesController GetInitialisedPropertiesController(IPropertyAllocationAndAdvertisingFacade propertyServiceFacade)
        {
            var controller = new PropertiesController(propertyServiceFacade)
            {
                Request = new HttpRequestMessage { RequestUri = new Uri(Url) },
                Configuration = new HttpConfiguration()
            };

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

            return controller;
        }