コード例 #1
0
ファイル: test_LocalSyncTable.cs プロジェクト: ralfw/sync
        public void Pass_on_new_file_by_timestamp()
        {
            var sut = new LocalSyncTable(null, new List<SyncTableEntry> { new SyncTableEntry { RelativeFilename = "myfn", TimeStamp = new DateTime(2000, 5, 12) } });

            var rf = new RepoFile { RelativeFileName = "myfn2", TimeStamp = new DateTime(2000, 5, 12) };
            RepoFile result = null;
            sut.FilterUnchangedByTimeStamp(rf, _ => result = _);

            Equalidator.AreEqual(result, rf);
        }
コード例 #2
0
ファイル: test_LocalSyncTable.cs プロジェクト: ralfw/sync
        public void Filter_unchanged_file_by_timestamp()
        {
            var sut = new LocalSyncTable(null, new List<SyncTableEntry> { new SyncTableEntry { RelativeFilename = "myfn", TimeStamp = new DateTime(2000, 5, 12) } });

            RepoFile result = null;
            sut.FilterUnchangedByTimeStamp(new RepoFile { RelativeFileName = "myfn", TimeStamp = new DateTime(2000, 5, 12) }, _ => result = _);

            Assert.IsNull(result);
        }
コード例 #3
0
ファイル: test_LocalSyncTable.cs プロジェクト: ralfw/sync
        public void Filter_with_timestamp_resolution_of_seconds()
        {
            var sut = new LocalSyncTable(null, new List<SyncTableEntry> { new SyncTableEntry { RelativeFilename = "myfn", TimeStamp = new DateTime(2000, 5, 12, 10, 11, 12, 123) } });

            RepoFile result = null;
            sut.FilterUnchangedByTimeStamp(new RepoFile { RelativeFileName = "myfn", TimeStamp = new DateTime(2000, 5, 12, 10, 11, 12, 456) }, _ => result = _);

            Assert.IsNull(result);
        }