WithoutMatching() 공개 메소드

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
리턴 List
예제 #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);
        }
예제 #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);
        }