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); }
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); }
public async Task <WeatherResult> GetAsync(string location, int speed, int temp) { var weatherApp = new WeatherAggregate(speed, temp, new WeatherData()); return(await weatherApp.GetAggregateAsync(location)); }