public void TestReportingProgressCancellationServiceTest_ContinueFalseWhenProgressNotCanceledAndNoeErrorExist() { var progressService = new Mock <IProgressService>(); progressService.SetupGet(x => x.ProgressCanceled).Returns(false); SyncServiceFactory.RegisterService(progressService.Object); var infoStorageService = new Mock <IInfoStorageService>(); infoStorageService.SetupGet(x => x.UserInformation). Returns(new InfoCollection <IUserInformation>() { new UserInformation() { Type = UserInformationType.Warning } }); SyncServiceFactory.RegisterService(infoStorageService.Object); var cancelTrueServiceInstance = new TestReportingProgressCancellationService(true); var shouldContinue = cancelTrueServiceInstance.CheckIfContinue(); Assert.AreEqual(shouldContinue, true); }
/// <summary> /// Method initializes the assembly. /// </summary> public void Init() { SyncServiceFactory.RegisterService <IInfoStorageService>(new InfoStorageService()); var confService = new ConfigurationService(); SyncServiceFactory.RegisterService <IConfigurationService>(confService); SyncServiceFactory.RegisterService <IProgressService>(new ProgressService()); var systemVariableService = new SystemVariableService(); SyncServiceFactory.RegisterService <ISystemVariableService>(systemVariableService); SyncServiceFactory.RegisterService <IWorkItemSyncService>(new WorkItemSyncService(systemVariableService)); }
public void TestReportingProgressCancellationServiceTest_ContinueFalseWhenProgressCanceledTrue() { //Arrange var progressService = new Mock <IProgressService>(); progressService.SetupGet(x => x.ProgressCanceled).Returns(true); SyncServiceFactory.RegisterService(progressService.Object); var infoStorageService = new Mock <IInfoStorageService>(); SyncServiceFactory.RegisterService(infoStorageService.Object); var cancelTrueServiceInstance = new TestReportingProgressCancellationService(true); //Act var shouldContinue = cancelTrueServiceInstance.CheckIfContinue(); Assert.AreEqual(shouldContinue, false); }
/// <summary> /// Method initializes the assembly. /// </summary> public void Init() { SyncServiceFactory.RegisterService <IWord2007AdapterCreator>(new AdapterCreator()); }
/// <summary> /// Method initializes the assembly. /// </summary> public void Init() { SyncServiceFactory.RegisterService <ITeamFoundationServerMaintenance>( new TeamFoundationServerMaintenance2010()); SyncServiceFactory.RegisterService <ITfsAdapterCreator>(new AdapterCreator()); }