Exemplo n.º 1
0
        public async Task Can_Retrieve_Traffic_Data()
        {
            // Arrange
            string start       = "London, UK";
            string destination = "Brighton, UK";

            // Act
            var entity = await _repo.GetTrafficInfoAsync(start, destination);

            // Assert
            Assert.NotNull(entity);
            Assert.Equal(0, entity.Info.Statuscode);
        }
Exemplo n.º 2
0
        public async Task <TrafficModel> GetTrafficModelAsync(string origin, string destination)
        {
            MapQuestTrafficEntity entity = await _repo.GetTrafficInfoAsync(origin, destination);

            TrafficModel model = MapFromEntity(entity);

            model.InitializeModel();
            model.Origin      = origin;
            model.Destination = destination;

            return(model);
        }