public async Task GetCurrentWeatherAsync_IfApiKeyEmptyOrNull_ThrowArgumentException() { _sut = OpenWeatherProcessor.Instance; _sut.ApiKey = null; //_sut.ApiKey = ""; await Assert.ThrowsAsync <ArgumentException>(() => _sut.GetCurrentWeatherAsync()); }
public OpenWeatherService(string apiKey) { owp = OpenWeatherProcessor.Instance; owp.ApiKey = apiKey; }
public async Task GetCurrentWeatherAsync_IfApiHelperNotInitialized_ThrowArgumentException() { _sut = OpenWeatherProcessor.Instance; ApiHelper.ApiClient = null; await Assert.ThrowsAsync <ArgumentException>(() => _sut.GetCurrentWeatherAsync()); }
public async Task GetOneCallAsync_IfApiHelperNotInitialized_ThrowArgumentException() { _sut = OpenWeatherProcessor.Instance; await Assert.ThrowsAsync <ArgumentException>(() => _sut.GetOneCallAsync()); }
public async Task GetOneCallAsync_IfApiKeyEmptyOrNull_ThrowArgumentException() { _sut = OpenWeatherProcessor.Instance; await Assert.ThrowsAsync <ArgumentException>(() => _sut.GetOneCallAsync()); }
public OpenWeatherService(string apiKey) { LastTemp = new TemperatureModel(); owp = OpenWeatherProcessor.Instance; owp.ApiKey = apiKey; }