public void LogChange_FromSameAsTo_DoesNotLogChange() { var log = new WritingSystemChangeLog(); log.LogChange("aaa", "aaa"); Assert.That(log.GetChangeFor("aaa"), Is.EqualTo(null)); }
public void GetChangeFor_InLogButNoChange_ReturnsSameId() { var log = new WritingSystemChangeLog(); log.LogChange("aaa", "bbb"); log.LogChange("bbb", "aaa"); Assert.That(log.GetChangeFor("aaa"), Is.EqualTo("aaa")); }
public void GetChangeFor_NotInLog_ReturnsNull() { var log = new WritingSystemChangeLog(); log.LogChange("aab", "bba"); Assert.That(log.GetChangeFor("fff"), Is.EqualTo(null)); }
public void GetChangeFor_HasChange_ReturnsCorrectWsId() { var log = new WritingSystemChangeLog(); log.LogChange("aab", "bba"); Assert.That(log.GetChangeFor("aab"), Is.EqualTo("bba")); }
public void Read_SampleLogFile_PopulatesChanges() { using (var e = new TestEnvironment()) { var log = new WritingSystemChangeLog(new WritingSystemChangeLogDataMapper(e.GetSampleLogFilePath())); Assert.That(log.HasChangeFor("aaa")); Assert.That(log.GetChangeFor("aaa"), Is.EqualTo("ddd")); } }