public void GetRouteLength() { var network = CreateThreeNodesNetwork(); var route = new Route { Network = network, }; //route going back to branch 0 route.Locations.Values.Add(new NetworkLocation(network.Branches[0], 5.0)); route.Locations.Values.Add(new NetworkLocation(network.Branches[1], 60.0)); route.Locations.Values.Add(new NetworkLocation(network.Branches[0], 10.0)); Assert.AreEqual(305.0, RouteHelper.GetRouteLength(route)); }
public void GetRouteLength() { var network = CreateThreeNodesNetwork(); NetworkCoverage route = new NetworkCoverage { Network = network, SegmentGenerationMethod = SegmentGenerationMethod.RouteBetweenLocations }; route.Locations.AutoSort = false; //route going back to branch 0 route.Locations.Values.Add(new NetworkLocation(network.Branches[0], 5.0)); route.Locations.Values.Add(new NetworkLocation(network.Branches[1], 60.0)); route.Locations.Values.Add(new NetworkLocation(network.Branches[0], 10.0)); Assert.AreEqual(305.0, RouteHelper.GetRouteLength(route)); }