コード例 #1
0
 public void CompareByVersionTest()
 {
     var comparer = new ChangedVersionComparer();
     bool identical = comparer.Equals(favoriteA, favoriteA);
     Assert.IsTrue(identical, "By Version compare failed");
     bool changed = comparer.Equals(favoriteA, favoriteA2);
     Assert.IsTrue(changed, "Initial version wasn't identified");
     changed = comparer.Equals(favoriteA, favoriteA2);
     Assert.IsTrue(changed, "First updated version wasn't identified");
     changed = comparer.Equals(favoriteA2, favoriteA3);
     Assert.IsTrue(changed, "Second updated version wasn't identified");
 }
コード例 #2
0
ファイル: ComparersTest.cs プロジェクト: zoroz/Terminals
        public void CompareByVersionTest()
        {
            var  comparer  = new ChangedVersionComparer();
            bool identical = comparer.Equals(favoriteA, favoriteA);

            Assert.IsTrue(identical, "By Version compare failed");
            bool changed = comparer.Equals(favoriteA, favoriteA2);

            Assert.IsTrue(changed, "Initial version wasn't identified");
            changed = comparer.Equals(favoriteA, favoriteA2);
            Assert.IsTrue(changed, "First updated version wasn't identified");
            changed = comparer.Equals(favoriteA2, favoriteA3);
            Assert.IsTrue(changed, "Second updated version wasn't identified");
        }