Compares events using a ICompareLogic object and reports the differences.
Наследование: IEventComparer
        public void CompareReturnsExpectedEventWhenObjectsAreEqual()
        {
            var comparer = new CompareLogic();
            var sut      = new CompareNetObjectsBasedEventComparer(comparer);

            var expected = new Event {
                Value = "1"
            };
            var actual = new Event {
                Value = "1"
            };
            var result = sut.Compare(expected, actual);

            Assert.That(result, Is.Empty);
        }
        public void CompareReturnsExpectedEventWhenObjectsDiffer()
        {
            var comparer = new CompareLogic();
            var sut      = new CompareNetObjectsBasedEventComparer(comparer);

            var expected = new Event {
                Value = "1"
            };
            var actual = new Event {
                Value = "2"
            };
            var result = sut.Compare(expected, actual);

            Assert.That(result,
                        Is.EquivalentTo(new[]
            {
                new EventComparisonDifference(expected, actual, "Types [String,String], Item Expected.Value != Actual.Value, Values (1,2)")
            }).Using(EventComparisonDifferenceComparer.Instance));
        }
        public void IsEventComparer()
        {
            var sut = new CompareNetObjectsBasedEventComparer(new CompareLogic());

            Assert.IsInstanceOf <IEventComparer>(sut);
        }