Example #1
0
        public void OnlyMismatchedRemain()
        {
            var obj = new ObjectDiff()
            {
                BaseValue      = 1,
                EvaluatedValue = 1,
                Items          =
                    new List <BaseDiff>()
                {
                    new BaseDiff()
                    {
                        BaseValue = 2, EvaluatedValue = 2
                    },
                    new BaseDiff()
                    {
                        BaseValue = 3, EvaluatedValue = 1
                    }
                }
            };

            var result = obj.WithoutMatching();

            Assert.Equal(1, result.Count);
            Assert.Equal(false, result.First().ValuesMatch);
        }
Example #2
0
        public void EmptyIfMatching()
        {
            var obj = new ObjectDiff()
            {
                BaseValue      = 1,
                EvaluatedValue = 1,
                Items          =
                    new List <BaseDiff>()
                {
                    new BaseDiff()
                    {
                        BaseValue = 2, EvaluatedValue = 2
                    },
                    new BaseDiff()
                    {
                        BaseValue = 3, EvaluatedValue = 3
                    }
                }
            };

            var result = obj.WithoutMatching();

            Assert.Equal(0, result.Count);
        }