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");
 }
 public async Task<HttpResponseMessage> GetStopsAtLandmark(StopsAtLandmarkRequest request)
 {
     var result = CheckCacheForEntry<IRequest, StopsAtLandmarkResponse>(request);
     if (result == null)
     {
         Logger.DebugFormat("Getting {0} from web: ", request.ToString());
         result = await new OpiaLocationClient().GetStopsAtLandmarkAsync(request);
         await StoreResultInCache<IRequest, StopsAtLandmarkResponse>(request, result);
     }
     var response = Request.CreateResponse(HttpStatusCode.OK, result);
     return response;
 }
        public void GetStopsAtLandmark_MustGetStopsAtLandmark()
        {
            // 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 response = _client.PostAsJsonAsync("location/getstopsatlandmark", requestEntity).Result;
            response.EnsureSuccessStatusCode();
            var result = response.Content.ReadAsAsync<ResolveResponse>().Result;
            Assert.Inconclusive("Need to find a landmark of type LocationId.LandmarkType.Landmark to use as a parameter");
        }
 public void StopsAtLandmarkRequest_ToString_WithNonEmptyLookupId_MustReturnCorrectQueryString()
 {
     var requestEntity = new StopsAtLandmarkRequest {LocationId = "some test landmark"};
     const string expected = "stops-at-landmark/some%20test%20landmark"; // note the use of a '/' instead of the usual '?'
     string actual = requestEntity.ToString();
     Assert.AreEqual(expected, actual);
 }
 public void StopsAtLandmarkRequest_ToString_WithEmptyLookupId_MustThrowArgumentException()
 {
     var requestEntity = new StopsAtLandmarkRequest();
     string expected = requestEntity.ToString();
 }