WithoutMatching() public method

This will remove any Diffed items that have matching a/b values. So only what is incorrect will remain. This will make hunting down problems much quicker.
public WithoutMatching ( ) : List
return List
Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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);
        }