Inheritance: StoryTeller.Messages.ClientMessage, IResultMessage
コード例 #1
0
        private void afterMatching()
        {
            var comparer = new UnorderedSetMatcher();
            var cells = new Cell[] {Cell.For<int>("x"), Cell.For<int>("y")};

            theResult = comparer.Match(cells, _expected, _actual);
        }
コード例 #2
0
        protected override void processMatch(StepValues actual, SetVerificationResult result, StepValues expected)
        {
            actual.IsMatched = true;

            if (expected.Order == actual.Order)
            {
                base.processMatch(actual, result, expected);
            }
            else
            {
                result.MarkWrongOrder(expected.id, actual.Order);
            }
        }
コード例 #3
0
        protected override void processMatch(StepValues actual, SetVerificationResult result, StepValues expected)
        {
            actual.IsMatched = true;

            if (expected.Order == actual.Order)
            {
                base.processMatch(actual, result, expected);
            }
            else
            {
                result.MarkWrongOrder(expected.id, actual.Order);
            }
        }
コード例 #4
0
        public virtual SetVerificationResult Match(Cell[] cells, IEnumerable<StepValues> expectedValues,
            IEnumerable<StepValues> actualValues)
        {
            var result = new SetVerificationResult();

            foreach (var expected in expectedValues)
            {
                var actual = actualValues.FirstOrDefault(x => cells.Matches(expected, x));
                if (actual == null)
                {
                    result.MarkMissing(expected.id);
                }
                else
                {
                    processMatch(actual, result, expected);
                }
            }

            actualValues.Where(x => !x.IsMatched).Each(result.MarkExtra);

            return result;
        }
コード例 #5
0
        public virtual SetVerificationResult Match(Cell[] cells, IEnumerable <StepValues> expectedValues,
                                                   IEnumerable <StepValues> actualValues)
        {
            var result = new SetVerificationResult();

            foreach (var expected in expectedValues)
            {
                var actual = actualValues.FirstOrDefault(x => cells.Matches(expected, x));
                if (actual == null)
                {
                    result.MarkMissing(expected.id);
                }
                else
                {
                    processMatch(actual, result, expected);
                }
            }

            actualValues.Where(x => !x.IsMatched).Each(result.MarkExtra);

            return(result);
        }
コード例 #6
0
 public void SetUp()
 {
     _expected.Clear();
     _actual.Clear();
     theResult = null;
 }
コード例 #7
0
 protected virtual void processMatch(StepValues actual, SetVerificationResult result, StepValues expected)
 {
     actual.IsMatched = true;
     result.MarkMatched(expected.id);
 }
コード例 #8
0
 public void SetUp()
 {
     theResult = new SetVerificationResult();
 }
コード例 #9
0
 protected virtual void processMatch(StepValues actual, SetVerificationResult result, StepValues expected)
 {
     actual.IsMatched = true;
     result.MarkMatched(expected.id);
 }