Exemplo n.º 1
0
        static void Main(string[] args)
        {
            DisplayTitle();

            if (args.Length != 1)
            {
                DisplayUsage();
                WaitForKeyPress();
                return;
            }

            IStreetSpecificationReader fileReader = new StreetSpecificationFileReader(args[0]);

            ITownPlanner townplanner = TownPlanner.Create(fileReader);

            townplanner.LoadStreetSpecification();
            var routeplanner = RoutePlanner.Create(townplanner);

            DisplayTownPlanningReport(townplanner);

            DisplayApproachOneReport(routeplanner);
            DisplayApproachTwoReport(routeplanner);

            WaitForKeyPress();
        }
Exemplo n.º 2
0
        private void GivenARoutePlanner()
        {
            var townPlanner = TownPlanner.Create(_streetSpecificationReader);

            townPlanner.LoadStreetSpecification();
            _routeplanner = RoutePlanner.Create(townPlanner);
        }
Exemplo n.º 3
0
        private void GivenADefaultTownPlanner()
        {
            var townPlanner = TownPlanner.Create(new StreetSpecificationFileReader("street1.txt"));

            townPlanner.LoadStreetSpecification();
            _routePlanner = RoutePlanner.Create(townPlanner);
        }