public void Get_timestamp_for_nonexistent_file() { var syncTable = new List<SyncTableEntry>(); var sut = new LocalSyncTable(REPO_PATH, syncTable); var result = sut.GetTimeStamp(new RepoFile { RelativeFileName = "myfn", Id = "new id", User = "******", TimeStamp = new DateTime(2000,5,12)}); Assert.IsNull(result); }
public void Get_timestamp() { var syncTable = new List<SyncTableEntry> { new SyncTableEntry {RelativeFilename = "myfn", Id = "myid", TimeStamp = new DateTime(2000, 5, 12), User = "******"} }; var sut = new LocalSyncTable(REPO_PATH, syncTable); var rf = new RepoFile {RelativeFileName = "myfn", Id = "new id", User = "******"}; var result = sut.GetTimeStamp(rf); Assert.AreNotSame(result, rf); Equalidator.AreEqual(result, new RepoFile { RelativeFileName = "myfn", Id = "new id", User = "******", TimeStamp = new DateTime(2000,5,12)}); }