Example #1
0
        public void IgnoreSamePropertyThroughoutTypeHierarchyChildren()
        {
            var ignoreList = new PropertyComparisonIgnoreList();

            ignoreList.Add <Event, Guid?>(x => x.ParentVersion);

            Assert.That(ignoreList.Contains(typeof(SalesOrderCreated), "ParentVersion"), Is.True);
            Assert.That(ignoreList.Contains(typeof(Event), "ParentVersion"), Is.True);
        }
        public void IgnoreSamePropertyThroughoutTypeHierarchyParents()
        {
            var ignoreList = new PropertyComparisonIgnoreList();

            ignoreList.Add <SalesOrderCreated, int>(x => x.Version);

            Assert.That(ignoreList.Contains(typeof(SalesOrderCreated), "Version"), Is.True);
            Assert.That(ignoreList.Contains(typeof(IEvent), "Version"), Is.True);
        }
Example #3
0
        public void IgnoreMultipleProperties()
        {
            var ignoreList = new PropertyComparisonIgnoreList();

            ignoreList.Add <SimpleObject, string>(x => x.StringProperty1);
            ignoreList.Add <SimpleObject, string>(x => x.StringProperty2);

            Assert.That(ignoreList.Contains(typeof(SimpleObject), "StringProperty1"), Is.True);
            Assert.That(ignoreList.Contains(typeof(SimpleObject), "StringProperty2"), Is.True);
        }