Exemple #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);
        }
Exemple #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);
        }
Exemple #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));
        }