public void SyncCommand_PurgedFile() { Decr1.UpdateTo("file1.txt < aa"); SyncDecr1andEncr1(); { var syncLog = Decr1AndEncr1SyncLog(); Assert.IsTrue(syncLog.Length == 1); Assert.IsTrue(syncLog[0].DecrFileName == "file1.txt"); Assert.IsTrue(syncLog[0].EntryType == FileEntryType.File); } Decr1.UpdateTo(""); SyncDecr1andEncr1(); { var syncLog = Decr1AndEncr1SyncLog(); Assert.IsTrue(syncLog.Length == 1); Assert.IsTrue(syncLog[0].DecrFileName == "file1.txt"); Assert.IsTrue(syncLog[0].EntryType == FileEntryType.Removed); } //removes the encr file should trigger a purge Encr1.Clear(new Regex("helix.hx")); SyncDecr1andEncr1(); { var syncLog = Decr1AndEncr1SyncLog(); Assert.IsTrue(syncLog.Length == 0); } }
protected virtual void Dispose(bool disposing) { if (!IsDisposed) { if (disposing) { Decr1.Dispose(); Decr2.Dispose(); Encr1.Dispose(); Encr2.Dispose(); } IsDisposed = true; } }