Beispiel #1
0
        public SetRowMatcher(IList<SetRow> expected, IList<SetRow> actual, RowValueMatcher matcher)
        {
            _expecteds = expected;
            _actuals = actual;
            _matcher = matcher;

            for (int i = 0; i < _expecteds.Count; i++)
            {
                _expecteds[i].ExpectedOrder = i + 1;
            }

            for (int i = 0; i < _actuals.Count; i++)
            {
                _actuals[i].ActualOrder = i + 1;
            }
        }
        public void Execute(IStep containerStep, ITestContext context)
        {
            var actualObjects = findTheObjects(containerStep, context);
            var actualRows = buildActualRows(actualObjects);
            var expectedRows = buildExpectedRows(context, containerStep);

            var valueMatcher = new RowValueMatcher(context);
            _comparer.Columns.Each(x => x.ConfigureMatcher(valueMatcher));

            var matcher = new SetRowMatcher(expectedRows, actualRows, valueMatcher);
            IList<SetRow> results = Ordered ? matcher.CompareOrdered() : matcher.Compare();

            markCounts(context, results);

            context.ResultsFor(containerStep).SetResult(results, _leafName);
        }
Beispiel #3
0
 public void SetUp()
 {
     matcher = new RowValueMatcher(new TestContext());
     row1 = new SetRow();
     row2 = new SetRow();
 }
Beispiel #4
0
 public void ConfigureMatcher(RowValueMatcher matcher)
 {
 }
Beispiel #5
0
 public void SetUp()
 {
     matcher = new RowValueMatcher(new TestContext());
     row1    = new SetRow();
     row2    = new SetRow();
 }