Exemple #1
0
        public void ReturnTheCorrectAvgPathLengthForRegularGraph3x3()
        {
            //Given
            Graph graph = Import.LoadCityFromText(InfraTests.file_path + "RegularGraph_3_3_2019_7_15_16_56_22.txt");
            var   avgpl = graph.AveragePathLenght();

            Assert.Equal(2, Math.Round(avgpl, ROUND_FIXED));
        }
Exemple #2
0
        public void ReturnTheCorrectAvgPathLengthForGraph5()
        {
            //Given
            Graph graph = Import.LoadCityFromText(InfraTests.file_path + "test_graph_5.avgplength.txt");
            var   avgpl = graph.AveragePathLenght();

            Assert.Equal(1.33333, Math.Round(avgpl, ROUND_FIXED));
        }