public async Task<HttpResponseMessage> GetRouteMapPath(RouteMapPathRequest request)
 {
     var result = CheckCacheForEntry<IRequest, RouteMapPathResponse>(request);
     if (result == null)
     {
         Logger.DebugFormat("Getting {0} from web: ", request.ToString());
         result = await new OpiaNetworkClient().GetRouteMapPathAsync(request);
         await StoreResultInCache<IRequest, RouteMapPathResponse>(request, result);
     }
     var response = Request.CreateResponse(HttpStatusCode.OK, result);
     return response;
 }
        public void GetRouteMapPath_MustGetRouteMapPath()
        {
            var requestEntity = new RouteMapPathRequest
            {
                RouteCode = "333",
                VehicleType = VehicleType.Bus,
                Date = DateTime.Now.AddDays(1),
            };

            var response = _client.PostAsJsonAsync("network/getroutemappath", requestEntity).Result;
            response.EnsureSuccessStatusCode();
            var result = response.Content.ReadAsAsync<RouteMapPathResponse>().Result;
            Assert.IsTrue(result.Paths.Any() && !String.IsNullOrWhiteSpace(result.Paths.First().MapPoints));
        }
        public async Task GetRouteMapPathAsync_MustGetRouteMapPathAsync()
        {
            var requestEntity = new RouteMapPathRequest
            {
                RouteCode = "333",
                VehicleType = VehicleType.Bus,
                Date = DateTime.Now.AddDays(1),
            };

            var networkRequestClient = new OpiaNetworkClient();
            var result = await networkRequestClient.GetRouteMapPathAsync(requestEntity);
            Assert.IsTrue(result.Paths.Any() && !String.IsNullOrWhiteSpace(result.Paths.First().MapPoints));
        }