コード例 #1
0
 public async Task GetStopsAtLandmarkAsync_MustGetStopsAtLandmarkAsync()
 {
     // note that this is not the right landmark type, but it does serve to exercise the query (we just get nothing back)
     var requestEntity = new StopsAtLandmarkRequest()
     {
         LocationId = "LM:Hotels & Motels:The Sebel King George Square",
     };
     var locationClient = new OpiaLocationClient();
     var result = await locationClient.GetStopsAtLandmarkAsync(requestEntity);
     Assert.Inconclusive("Need to find a landmark of type LocationId.LandmarkType.Landmark");
 }
コード例 #2
0
        public async Task ResolveAsync_MustResolveFreeFormLocationTextAsync()
        {
            var requestEntity = new ResolveRequest
            {
                LookupText = "Anzac Sq., Brisbane",
                LocationType = 0,
                MaxResults = 10
            };

            var locationClient = new OpiaLocationClient();
            var result = await locationClient.ResolveAsync(requestEntity);
            Assert.IsTrue(result.Locations.Any());

        }
コード例 #3
0
        public void GetStopsNearby_LocationId_MustGetStopsNearbyLocationId()
        {
            var requestEntity = new StopsNearbyRequest
            {
                LocationId = "AD:Anzac Rd, Eudlo",
                UseWalkingDistance = true,
                RadiusInMetres = 2000,
                MaxResults = 10,
            };

            var locationClient = new OpiaLocationClient();
            var result = locationClient.GetStopsNearby(requestEntity);
            Assert.IsTrue(result.NearbyStops.Any());
        }
コード例 #4
0
        public async Task GetLocationsByIdsAsync_MustGetLocationsByIdsAsync()
        {
            var requestEntity = new LocationsRequest()
            {
                LocationIds = new List<string>() { "LM:Parks & Reserves:Anzac Square", "LM:Parks & Reserves:Botanic Gardens" }
            };

            var locationClient = new OpiaLocationClient();
            LocationsResponse result = await locationClient.GetLocationsByIdsAsync(requestEntity);
            Assert.IsTrue(result.Locations.Any());
        }
コード例 #5
0
        public async Task GetStopsByIdsAsync_MustGetStopsByIdsAsync()
        {
            var requestEntity = new StopsRequest
            {
                StopIds = new List<string>() { "000026", "005468" }
            };

            var locationClient = new OpiaLocationClient();
            var result = await locationClient.GetStopsByIdsAsync(requestEntity);
            Assert.IsTrue(result.Stops.Any());
        }
コード例 #6
0
        public void GetStopsByIds_MustGetStopsByIds()
        {
            var requestEntity = new StopsRequest
            {
                StopIds = new List<string>() { "000026", "005468" }
            };

            var locationClient = new OpiaLocationClient();
            var result = locationClient.GetStopsByIds(requestEntity);
            Assert.IsTrue(result.Stops.Any());
        }