Пример #1
0
        public void TestPlanTour_TwoPoints()
        {
            // set up
            var engine = new PlanTourEngine();

            engine.LoadGraph(GetPlanTourKmlStream());

            // run
            var planTourParameters = new PlanTourParameters
            {
                WaypointIdList = new List <string>
                {
                    "wheretofly-path-bahnhof-neuhaus",
                    "wheretofly-path-rauhkopf",
                }
            };

            var tour = engine.PlanTour(planTourParameters);

            // check
            Assert.IsTrue(tour.Description.Any(), "description must contain text");
            Assert.IsTrue(tour.TotalDuration.TotalMinutes > 0, "total duration must contain value");
            Assert.IsTrue(tour.TourEntriesList.Any(), "tour entries list must be filled");
            Assert.IsTrue(tour.MapPointList.Any(), "map point list must be filled");
        }
Пример #2
0
        public void TestPlanTour_GrandTour()
        {
            // set up
            var engine = new PlanTourEngine();

            engine.LoadGraph(GetPlanTourKmlStream());

            // run
            var planTourParameters = new PlanTourParameters
            {
                WaypointIdList = new List <string>
                {
                    "wheretofly-path-bahnhof-neuhaus",
                    "wheretofly-path-spitzingsattel",
                    "wheretofly-path-jagerkamp",
                    ////"wheretofly-path-benzingspitz",
                    "wheretofly-path-tanzeck",
                    "wheretofly-path-aiplspitz",
                    "wheretofly-path-rauhkopf",
                    "wheretofly-path-taubensteinhaus",
                    "wheretofly-path-hochmiesing",
                    "wheretofly-path-rotwand",
                    "wheretofly-path-rotwandhaus",
                    "wheretofly-path-lempersberg",
                    "wheretofly-path-taubenstein",
                    ////"wheretofly-path-albert-link-haus",
                    ////"wheretofly-path-stolzenberg",
                    ////"wheretofly-path-rotkopf",
                    ////"wheretofly-path-rosskopf",
                    ////"wheretofly-path-stuempfling",
                    ////"wheretofly-path-bodenschneid",
                    ////"wheretofly-path-brecherspitz",
                    "wheretofly-path-bahnhof-neuhaus",
                }
            };

            var tour = engine.PlanTour(planTourParameters);

            // check
            Assert.IsTrue(tour.Description.Any(), "description must contain text");
            Assert.IsTrue(tour.TotalDuration.TotalMinutes > 0, "total duration must contain value");
            Assert.IsTrue(tour.TourEntriesList.Any(), "tour entries list must be filled");
            Assert.IsTrue(tour.MapPointList.Any(), "map point list must be filled");
        }
Пример #3
0
        public void TestPlanTour_OnePoint()
        {
            // set up
            var engine = new PlanTourEngine();

            engine.LoadGraph(GetPlanTourKmlStream());

            // run
            var planTourParameters = new PlanTourParameters
            {
                WaypointIdList = new List <string>
                {
                    "wheretofly-path-bahnhof-neuhaus",
                }
            };

            Assert.ThrowsException <InvalidOperationException>(
                () => engine.PlanTour(planTourParameters));
        }