Exemple #1
0
        private static void Compare(String input, String expectedOutput)
        {
            var data = Graph.GetDataFromInput(input);

            var graph = new Graph(
                new List<String>((String[])data.GetType().GetProperty("nodes").GetValue(data)),
                (Dictionary<String, Dictionary<String, Int32>>)data.GetType().GetProperty("map").GetValue(data),
                data.GetType().GetProperty("start").GetValue(data).ToString(),
                data.GetType().GetProperty("end").GetValue(data).ToString()
            );

            Assert.AreEqual(graph.GetOutput(), expectedOutput);
        }
Exemple #2
0
        private static void Compare(String input, String expectedOutput)
        {
            var data = Graph.GetDataFromInput(input);

            var graph = new Graph(
                new List <String>((String[])data.GetType().GetProperty("nodes").GetValue(data)),
                (Dictionary <String, Dictionary <String, Int32> >)data.GetType().GetProperty("map").GetValue(data),
                data.GetType().GetProperty("start").GetValue(data).ToString(),
                data.GetType().GetProperty("end").GetValue(data).ToString()
                );

            Assert.AreEqual(graph.GetOutput(), expectedOutput);
        }