Exemple #1
0
        private static void Trip5x(Osrm5x osrm)
        {
            var locations = new Location[] {
                new Location(52.503033, 13.420526),
                new Location(52.516582, 13.429290),
            };

            var result = osrm.Trip(locations);
        }
        private async static Task Trip5x(Osrm5x osrm)
        {
            var locations = new Location[] {
                new Location(52.503033, 13.420526),
                new Location(52.516582, 13.429290),
            };

            var result = await osrm.Trip(locations);
        }
        public void Trip_Response()
        {
            var locations = new Location[] {
                new Location(52.503033m, 13.420526m),
                new Location(52.516582m, 13.429290m),
            };

            var result = osrm.Trip(locations).GetAwaiter().GetResult();

            Assert.AreEqual <string>("Ok", result.Code);
            Assert.AreEqual <int>(1, result.Trips.Length);
            Assert.IsTrue(result.Trips[0].Legs.Length > 0);
        }