public void DownloadPhotoByDate(string date, string url)
        {
            var    key     = "DEMO_Key";
            string dateT   = "02 / 27 / 17";
            var    manager = new DownloadPhoto();

            manager.DownloadPhotoAsync(dateT, key, url).Wait();
        }
        /// <summary>
        /// Download Photo for specific Rover By earth Date
        /// </summary>
        /// <param name="date"></param>
        /// <param name="key"></param>
        /// <param name="rover"></param>
        public void DownloadPhotoForRoverAsync(string date, string key, Rover rover)
        {
            Logger.Info($"Download Photo For Rover {0}", Rover);
            var           uri = UriRover(this.Uri, rover);
            DownloadPhoto dl  = new DownloadPhoto(new HttpCommClientService());

            dl.DownloadPhotoAsync(date, key, uri).Wait();
        }
        public RoverPhotosViewModel CreateViewModel(string date, string url)
        {
            RoverPhotosViewModel roverPhotosViewModel = new RoverPhotosViewModel();

            roverPhotosViewModel.SelectedDate = date;
            var key     = "DEMO_Key";
            var manager = new DownloadPhoto();

            manager.DownloadPhotoAsync(date, key, url).Wait();
            return(roverPhotosViewModel);
        }
        public void Download_WillReturn_FilePath()
        {
            string testdate = "2017-02-27";

            downloadPhoto.DownloadPhotoAsync(baseString, testdate, apiKey).Wait();

            var expectedPath = @"c:\MarsRover\2017-02-27\";

            Assert.IsTrue(Directory.Exists(expectedPath));

            string[] fileEntries = Directory.GetFiles(expectedPath);
            foreach (string fileName in fileEntries)
            {
                Assert.IsTrue(fileName.EndsWith(".jpg"));
            }
        }