public void Setup()
 {
     _photosController =
         ControllerHelper.GetInitialisedPhotosController(_mockPhotoService.Object);
     AutoMapperConfig.Bootstrap();
 }
        public static PhotosController GetInitialisedPhotosController(IPhotoServiceAdvertisingFacade photoService)
        {
            var controller = new PhotosController(photoService)
            {
                Request = new HttpRequestMessage { RequestUri = new Uri(Url) },
                Configuration = new HttpConfiguration()
            };

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

            return controller;
        }