Пример #1
0
        static void Reject(object expected, object actual, Pair <string> path, ShouldLookLikeOptions options)
        {
            var pathString = path.Reverse().Join("/");

            if (options.ExceptPaths.Contains(pathString))
            {
                return;
            }

            throw new SpecificationException(string.Format("Mismatch at {0}\nExpected : {1}\nActual   : {2}",
                                                           pathString, TestHelperHelpers.Stringify(expected), TestHelperHelpers.Stringify(actual)));
        }
Пример #2
0
 static void Reject(object actual, object expected, int index)
 {
     throw new SpecificationException(string.Format("Enumerables differ at index {0}. Expected: {1}. Actual: {2}.",
                                                    index, TestHelperHelpers.Stringify(expected), TestHelperHelpers.Stringify(actual)));
 }
Пример #3
0
 static void Reject(string badName, object badValue, string goodName, int index)
 {
     throw new SpecificationException(string.Format("{0} contains more items than {1}. First non-matching {0} item (at index {2}): {3}",
                                                    badName, goodName, index, TestHelperHelpers.Stringify(badValue)));
 }