Skip to content

Commit

Permalink
Merge pull request #85 from yumemi-inc/feature/fix-decoding-error
Browse files Browse the repository at this point in the history
Example プロジェクトのビルド及びテストができなくなっていたのを修正しました。
  • Loading branch information
es-kumagai authored Jul 18, 2024
2 parents 21e7b36 + 495ccd1 commit 2b29eb4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Example/Example/UI/Weather/WeatherViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ class WeatherViewController: UIViewController {
func handleWeather(result: Result<Response, WeatherError>) {
switch result {
case .success(let response):
weatherImageView.set(weather: response.weather)
minTempLabel.text = String(response.minTemp)
maxTempLabel.text = String(response.maxTemp)
weatherImageView.set(weather: response.weatherCondition)
minTempLabel.text = String(response.minTemperature)
maxTempLabel.text = String(response.maxTemperature)

case .failure(let error):
let message: String
Expand Down
8 changes: 4 additions & 4 deletions Example/ExampleTests/WeatherViewControllerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class WeatherViewControllerTests: XCTestCase {
@MainActor
func test_天気予報がsunnyだったらImageViewのImageにsunnyが設定されること_TintColorがredに設定されること() async throws {
weatherModel.fetchWeatherImpl = { _ in
let response = Response(weather: .sunny, maxTemp: 0, minTemp: 0, date: Date())
let response = Response(weatherCondition: .sunny, maxTemperature: 0, minTemperature: 0, date: Date())
return Result.success(response)
}

Expand All @@ -44,7 +44,7 @@ class WeatherViewControllerTests: XCTestCase {
@MainActor
func test_天気予報がcloudyだったらImageViewのImageにcloudyが設定されること_TintColorがgrayに設定されること() async throws {
weatherModel.fetchWeatherImpl = { _ in
let response = Response(weather: .cloudy, maxTemp: 0, minTemp: 0, date: Date())
let response = Response(weatherCondition: .cloudy, maxTemperature: 0, minTemperature: 0, date: Date())
return Result.success(response)
}

Expand All @@ -58,7 +58,7 @@ class WeatherViewControllerTests: XCTestCase {
@MainActor
func test_天気予報がrainyだったらImageViewのImageにrainyが設定されること_TintColorがblueに設定されること() async throws {
weatherModel.fetchWeatherImpl = { _ in
let response = Response(weather: .rainy, maxTemp: 0, minTemp: 0, date: Date())
let response = Response(weatherCondition: .rainy, maxTemperature: 0, minTemperature: 0, date: Date())
return Result.success(response)
}

Expand All @@ -72,7 +72,7 @@ class WeatherViewControllerTests: XCTestCase {
@MainActor
func test_最高気温_最低気温がUILabelに設定されること() async throws {
weatherModel.fetchWeatherImpl = { _ in
let response = Response(weather: .rainy, maxTemp: 100, minTemp: -100, date: Date())
let response = Response(weatherCondition: .rainy, maxTemperature: 100, minTemperature: -100, date: Date())
return Result.success(response)
}

Expand Down

0 comments on commit 2b29eb4

Please sign in to comment.