diff --git a/Sources/Weather/Models/Forecast.swift b/Sources/Weather/Models/Forecast.swift index a1a1f8e..8a8162d 100644 --- a/Sources/Weather/Models/Forecast.swift +++ b/Sources/Weather/Models/Forecast.swift @@ -49,3 +49,24 @@ public struct Forecast: Decodable { return self.get(name)[keyPath: keyPath] } } + +#if DEBUG +extension Forecast { + public static var example: Forecast { + return Forecast( + validTime: Date(), + parameters: [ + Parameter( + name: .t, + levelType: .unknown, + level: 0, + unit: "Cel", + values: [ + Double.random(in: -10...10) + ] + ) + ] + ) + } +} +#endif