public void SetUp() { this.manager = new ActiveActivitiesManager(); this.session = new Mock <ISession>(); this.storage = new Mock <IMetaDataStorage>(); this.queue = new Mock <ISyncEventQueue>(); this.fsFactory = new Mock <IFileSystemInfoFactory>(); this.underTest = new RemoteObjectChanged(this.session.Object, this.storage.Object, this.queue.Object, this.manager, this.fsFactory.Object); }
public void SetUp() { this.manager = new TransmissionManager(); this.session = new Mock <ISession>(); this.session.SetupTypeSystem(); this.storage = new Mock <IMetaDataStorage>(); this.fsFactory = new Mock <IFileSystemInfoFactory>(); this.underTest = new RemoteObjectChanged(this.session.Object, this.storage.Object, null, this.manager, this.fsFactory.Object); }
public void RemoteFileChangedWhileDeleteLocalCacheBeforeContinue() { this.SetupRemoteFileChanged(); var solver = new RemoteObjectChanged(this.session.Object, this.storage.Object, this.transmissionStorage.Object, this.transmissionManager, this.fsFactory.Object); this.RunSolverToAbortDownload(solver, remoteContent: ContentChangeType.CHANGED); this.RunSolverToDeleteLocalCacheBeforeContinue(solver, remoteContent: ContentChangeType.CHANGED); this.cacheFile.Verify(c => c.Replace(this.localFile.Object, this.backupFile.Object, true), Times.Once()); this.backupFile.Verify(b => b.Delete(), Times.Once()); }