public async Task TestWeatherReaderServiceIsUnavailable() { //Driven port //Right side IWeatherReaderPort weatherReaderPort = WeatherReaderPortStub.WhichUnavailable(); //Hexagon IWeatherForecastPort sut = CreateForecastPort(weatherReaderPort); var result = await Assert.ThrowsAnyAsync <WeatherReaderServiceUnavailableException>(() => sut.GetTodayWeather()); Assert.Equal("سرویس در دسترس نمی باشد", result.Message); }
public async Task Run() { var result = await _port.GetTodayWeather(); _consoleWriter.WriteLine(result); }