コード例 #1
0
        public async Task GetRouteTest()
        {
            var testHandler = TestMessageHandler.FromResourceResponse("RouteFrom1172_34ToRedlandsCA");
            var result      = await new RouteService(testHandler).GetRoute(
                new MapPoint(-117.2, 34)
            {
                SpatialReference = SpatialReferences.Wgs84
            },
                new MapPoint(-117.18253721699972, 34.055566969000438)
            {
                SpatialReference = SpatialReferences.Wgs84
            },
                CancellationToken.None);

            Assert.IsNotNull(result);
        }
コード例 #2
0
        public static void Initialize(TestContext context)
        {
            var testHandler = TestMessageHandler.FromResourceResponse("RouteFrom1172_34ToRedlandsCA");
            var task        = new RouteService(testHandler).GetRoute(
                new MapPoint(-117.2, 34)
            {
                SpatialReference = SpatialReferences.Wgs84
            },
                new MapPoint(-117.18253721699972, 34.055566969000438)
            {
                SpatialReference = SpatialReferences.Wgs84
            },
                CancellationToken.None);

            task.Wait();
            route = task.Result;
        }