public async Task Can_Retrieve_Traffic_Data()
        {
            // Arrange
            GoogleMapsTrafficEntity entity = null;
            string start       = "London, UK";
            string destination = "Brighton, UK";

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

            // Assert
            Assert.NotNull(entity);
            Assert.Equal("OK", entity.Status);
        }
Ejemplo n.º 2
0
        public async Task <TrafficModel> GetTrafficModelAsync(string origin, string destination)
        {
            GoogleMapsTrafficEntity entity = await _repo.GetTrafficInfoAsync(origin, destination);

            TrafficModel model = MapFromEntity(entity);

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

            return(model);
        }