示例#1
0
        /// <summary>
        /// Raised when the user clicks the download button on the view.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void View_DownloadButtonClicked(object sender, EventArgs args)
        {
            var standingDataManager = Factory.Singleton.ResolveSingleton <IStandingDataManager>();

            var busyState = _View.ShowBusy(true, null);

            try {
                _View.Status = Strings.DownloadingPleaseWait;

                IStandingDataUpdater updater = Factory.Singleton.Resolve <IStandingDataUpdater>();
                updater.Update();

                standingDataManager.Load();
            } finally {
                _View.Status = standingDataManager.RouteStatus;
                _View.ShowBusy(false, busyState);
            }
        }
示例#2
0
 public void StandingDataUpdater_Update_Always_Downloads_State_File()
 {
     SetupValidStateFileDownload();
     _Implementation.Update();
     _Provider.Verify(p => p.DownloadLines(It.Is <string>(u => u.ToUpper() == StateFileUrl)), Times.Once());
 }