상속: StoryTeller.Messages.ClientMessage, IResultMessage
        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);
            }
        }
        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;
        }
        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);
        }
 public void SetUp()
 {
     _expected.Clear();
     _actual.Clear();
     theResult = null;
 }
 protected virtual void processMatch(StepValues actual, SetVerificationResult result, StepValues expected)
 {
     actual.IsMatched = true;
     result.MarkMatched(expected.id);
 }
 public void SetUp()
 {
     theResult = new SetVerificationResult();
 }
 protected virtual void processMatch(StepValues actual, SetVerificationResult result, StepValues expected)
 {
     actual.IsMatched = true;
     result.MarkMatched(expected.id);
 }