コード例 #1
0
 private void DisplayAsPathStringsWhichCanBeUsedInXml(IList <Path> shortestPaths, PathParser <Path, Edge, Vertex, Weight> pathParser)
 {
     output("-----");
     output("The below output is in a format which can be used in xml files with test cases defining the expected output");
     foreach (Path path in shortestPaths)
     {
         output(pathParser.FromPathToString(path));
     }
     output("-----");
 }
コード例 #2
0
        private string GetMessageIncludingActualAndExpectedPath(Path actualPath, Path expectedPath)
        {
            string actualPathAsString   = getPathAsPrettyPrintedStringForConsoleOutput(actualPath);
            string expectedPathAsString = getPathAsPrettyPrintedStringForConsoleOutput(expectedPath);
            string messageIncludingActualAndExpectedPath = " , actualPath : " + actualPathAsString + " expectedPath :  " + expectedPathAsString;

            messageIncludingActualAndExpectedPath += NEW_LINE + "actual path in xml format:" + NEW_LINE + pathParserUsedForPrintingToXmlFormatInAssertionMessage.FromPathToString(actualPath);
            messageIncludingActualAndExpectedPath += NEW_LINE + "expected path in xml format:" + NEW_LINE + pathParserUsedForPrintingToXmlFormatInAssertionMessage.FromPathToString(expectedPath);
            return(messageIncludingActualAndExpectedPath);
        }