public void ensure_west_to_east_meets_provided_order() { var expected = new[] { 1, 3, 5, 7, 9, 10, 8, 6, 4, 2 }; _streetSpecificationReader = Substitute.For <IStreetSpecificationReader>(); _streetSpecificationReader.LoadFile().Returns(new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }); GivenARoutePlanner(); var actual = _routeplanner.GetDeliveryByNorthSideThenSouthSide(); _routeplanner.TotalRoadCrossing().ShouldBe(1); actual.ShouldBe(expected); }
public void Given_a_valid_file_when_delivering_on_north_side_and_delivering_on_south_side_then_delivery_order_should_match_order_provided() { GivenADefaultTownPlanner(); var expectedNorthSideHouses = new List <int> { 1, 3, 5, 4, 2 }; var deliveryOrder = _routePlanner.GetDeliveryByNorthSideThenSouthSide(); deliveryOrder.ShouldBe(expectedNorthSideHouses); _routePlanner.TotalRoadCrossing().ShouldBe(1); }
private static void DisplayApproachOneReport(RoutePlanner routeplanner) { System.Console.WriteLine(); System.Console.WriteLine("Newspaper delivery report (Story 2)"); System.Console.WriteLine("-----------------------------------"); System.Console.WriteLine(); System.Console.WriteLine("Appraoch one delivery order: {0}", string.Join(", ", routeplanner.GetDeliveryByNorthSideThenSouthSide())); System.Console.WriteLine("Appraoch one total road crossings: {0}", routeplanner.TotalRoadCrossing()); }