Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        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);
        }