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

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

            return controller;
        }