public void FileSystem_CompareFile_Delete() { var left = new FileEntry(Hash.Create(1, 0, 0, 0), Hash.Create(1, 1, 1, 1)); var result = FileEntry.Compare(left, null); Assert.AreEqual(ChangeEntryAction.Delete, result); }
public void FileSystem_CompareFile_Create() { var right = new FileEntry(Hash.Create(1, 0, 0, 0), Hash.Create(1, 1, 1, 1)); var result = FileEntry.Compare(null, right); Assert.AreEqual(ChangeEntryAction.Create, result); }
public void FileSystem_CompareFile_Replace() { var left = new FileEntry(Hash.Create(1, 0, 0, 0), Hash.Create(1, 1, 1, 1)); var right = new FileEntry(Hash.Create(1, 0, 0, 0), Hash.Create(2, 2, 2, 2)); var result = FileEntry.Compare(left, right); Assert.AreEqual(ChangeEntryAction.Replace, result); }
public void FileSystem_CompareFile_OK() { var left = new FileEntry(Hash.Create(1, 2, 3, 4), Hash.Create(4, 3, 2, 1)); var right = new FileEntry(Hash.Create(1, 2, 3, 4), Hash.Create(4, 3, 2, 1)); var result = FileEntry.Compare(left, right); Assert.AreEqual(ChangeEntryAction.OK, result); }