Пример #1
0
        public void Filter_unchanged_file_by_id()
        {
            var sut = new LocalSyncTable(null, new List<SyncTableEntry> { new SyncTableEntry { RelativeFilename = "myfn", Id="myid" } });

            RepoFile result = null;
            sut.FilterUnchangedById(new RepoFile { RelativeFileName = "myfn", Id = "myid"}, _ => result = _);

            Assert.IsNull(result);
        }
Пример #2
0
        public void Pass_on_changed_file_by_id()
        {
            var sut = new LocalSyncTable(null, new List<SyncTableEntry> { new SyncTableEntry { RelativeFilename = "myfn", Id="myid" } });

            var rf = new RepoFile { RelativeFileName = "myfn", Id="my new id" };
            RepoFile result = null;
            sut.FilterUnchangedById(rf, _ => result = _);

            Equalidator.AreEqual(result, rf);
        }