Example #1
0
        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"));
		}
Example #3
0
        public void GetChangeFor_NotInLog_ReturnsNull()
        {
            var log = new WritingSystemChangeLog();

            log.LogChange("aab", "bba");
            Assert.That(log.GetChangeFor("fff"), Is.EqualTo(null));
        }
Example #4
0
        public void GetChangeFor_HasChange_ReturnsCorrectWsId()
        {
            var log = new WritingSystemChangeLog();

            log.LogChange("aab", "bba");
            Assert.That(log.GetChangeFor("aab"), Is.EqualTo("bba"));
        }
Example #5
0
        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 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"));
     }
 }
		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"));
			}
		}
		public void LogChange_FromSameAsTo_DoesNotLogChange()
		{
			var log = new WritingSystemChangeLog();
			log.LogChange("aaa", "aaa");
			Assert.That(log.GetChangeFor("aaa"), Is.EqualTo(null));
		}
		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"));
		}