Пример #1
0
        public void TestRoute2_Regression_WhenRegistered()
        {
            Itinero.Osm.Vehicles.Vehicle.RegisterVehicles();

            var route = TestRouteBuilder.BuildRoute(
                System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(
                    "Itinero.Test.test_data.routes.route2.json"));

            Assert.IsNotNull(route);
            var instructions = route.GenerateInstructions();
        }
Пример #2
0
        public void TestRoute2_Regression_WhenExplicitlyProvided()
        {
            var route = TestRouteBuilder.BuildRoute(
                System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(
                    "Itinero.Test.test_data.routes.route2.json"));

            Assert.IsNotNull(route);

            Itinero.Profiles.Profile.ClearRegistered();
            var instructions = route.GenerateInstructions(Itinero.Osm.Vehicles.Vehicle.Car.Fastest());
        }
Пример #3
0
        public void TestRoute2_Regression_ThrowsWhenProfileNotRegistered()
        {
            var route = TestRouteBuilder.BuildRoute(
                System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(
                    "Itinero.Test.test_data.routes.route2.json"));

            Assert.IsNotNull(route);
            Itinero.Profiles.Profile.ClearRegistered();
            Assert.Catch <Exception>(() =>
            {
                var instructions = route.GenerateInstructions();
            });
        }