예제 #1
0
        public void Filter_existing_file()
        {
            var syncTable = new List<SyncTableEntry> { new SyncTableEntry { RelativeFilename = "myfn" } };
            var sut = new RemoteSyncTable(null, syncTable);

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

            Assert.IsNull(result);
        }
예제 #2
0
        public void Pass_through_nonexisting_file()
        {
            var syncTable = new List<SyncTableEntry> { new SyncTableEntry { RelativeFilename = "myfn" } };
            var sut = new RemoteSyncTable(null, syncTable);

            RepoFile result = null;
            sut.FilterExistingFiles(new RepoFile { RelativeFileName = "my nonexisting fn" }, _ => result = _);

            Equalidator.AreEqual(result, new RepoFile{RelativeFileName = "my nonexisting fn"});
        }