Ejemplo n.º 1
0
        public void Test_Aggregate_Speed_Kph(int speedUnit, int tempUnit, double expectedResult)
        {
            //arrange
            var weatherAggregate = new WeatherAggregate(speedUnit, tempUnit, DataAccess);

            //act
            var response = weatherAggregate.GetAggregateAsync(It.IsAny <String>()).Result;

            //assert
            Assert.Equal(response.WindSpeed, expectedResult);
        }
Ejemplo n.º 2
0
        public void Test_Aggregate_Temp_Faren(int speedUnit, int tempUnit, int expectedResult)
        {
            //arrange
            var weatherAggregate = new WeatherAggregate(speedUnit, tempUnit, DataAccess);

            //act
            var response = weatherAggregate.GetAggregateAsync(It.IsAny <String>()).Result;

            //assert
            Assert.Equal(response.Temperature, expectedResult);
        }
Ejemplo n.º 3
0
        public async Task <WeatherResult> GetAsync(string location, int speed, int temp)
        {
            var weatherApp = new WeatherAggregate(speed, temp, new WeatherData());

            return(await weatherApp.GetAggregateAsync(location));
        }