From 906e6c600d2712093a63d08686dd09b90dcd619e Mon Sep 17 00:00:00 2001 From: Satyam Ghodasara Date: Wed, 13 Mar 2019 16:52:47 -0400 Subject: [PATCH] Add dedicated JSON for DataPoint testing --- ForecastIO.xcodeproj/project.pbxproj | 6 ++++++ Tests/Resources/datapoint.json | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Tests/Resources/datapoint.json diff --git a/ForecastIO.xcodeproj/project.pbxproj b/ForecastIO.xcodeproj/project.pbxproj index 7948f5e..0c78c51 100644 --- a/ForecastIO.xcodeproj/project.pbxproj +++ b/ForecastIO.xcodeproj/project.pbxproj @@ -55,6 +55,8 @@ 4A92DEA82239997C00C12799 /* alerts_no_optionals.json in Resources */ = {isa = PBXBuildFile; fileRef = 4A92DEA6223997F900C12799 /* alerts_no_optionals.json */; }; 4A92DEAA22399B9000C12799 /* flag.json in Resources */ = {isa = PBXBuildFile; fileRef = 4A92DEA922399B9000C12799 /* flag.json */; }; 4A92DEAB22399CF100C12799 /* flag.json in Resources */ = {isa = PBXBuildFile; fileRef = 4A92DEA922399B9000C12799 /* flag.json */; }; + 4A92DEAD2239A31100C12799 /* datapoint.json in Resources */ = {isa = PBXBuildFile; fileRef = 4A92DEAC2239A31100C12799 /* datapoint.json */; }; + 4A92DEAE2239A32C00C12799 /* datapoint.json in Resources */ = {isa = PBXBuildFile; fileRef = 4A92DEAC2239A31100C12799 /* datapoint.json */; }; 4AA3256E1D615F03003CFFA9 /* DataBlockTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4D9F2CF1C5442C400A4A02F /* DataBlockTests.swift */; }; 4AA3256F1D615F03003CFFA9 /* DataPointTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4D9F2CB1C54410300A4A02F /* DataPointTests.swift */; }; 4AA325701D615F03003CFFA9 /* FlagTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4D9F2C71C54400700A4A02F /* FlagTests.swift */; }; @@ -162,6 +164,7 @@ 4A92DEA322398FD300C12799 /* alerts.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = alerts.json; path = Tests/Resources/alerts.json; sourceTree = SOURCE_ROOT; }; 4A92DEA6223997F900C12799 /* alerts_no_optionals.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = alerts_no_optionals.json; path = Tests/Resources/alerts_no_optionals.json; sourceTree = SOURCE_ROOT; }; 4A92DEA922399B9000C12799 /* flag.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = flag.json; path = Tests/Resources/flag.json; sourceTree = SOURCE_ROOT; }; + 4A92DEAC2239A31100C12799 /* datapoint.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = datapoint.json; path = Tests/Resources/datapoint.json; sourceTree = SOURCE_ROOT; }; 4AB7086C1D45230F005D1E8E /* LanguageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LanguageTests.swift; path = Tests/LanguageTests.swift; sourceTree = SOURCE_ROOT; }; 4AB708701D45246C005D1E8E /* IconTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = IconTests.swift; path = Tests/IconTests.swift; sourceTree = SOURCE_ROOT; }; 4AB708741D452539005D1E8E /* PrecipitationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PrecipitationTests.swift; path = Tests/PrecipitationTests.swift; sourceTree = SOURCE_ROOT; }; @@ -369,6 +372,7 @@ children = ( 4A14A6EE1CDAA80300D4C108 /* forecast_bare.json */, D4D9F2B41C54061600A4A02F /* forecast.json */, + 4A92DEAC2239A31100C12799 /* datapoint.json */, 4A92DEA922399B9000C12799 /* flag.json */, 4A92DEA322398FD300C12799 /* alerts.json */, 4A92DEA6223997F900C12799 /* alerts_no_optionals.json */, @@ -658,6 +662,7 @@ files = ( 4A92DEAA22399B9000C12799 /* flag.json in Resources */, 4A92DEA422398FD300C12799 /* alerts.json in Resources */, + 4A92DEAD2239A31100C12799 /* datapoint.json in Resources */, 4A92DEA7223997F900C12799 /* alerts_no_optionals.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -675,6 +680,7 @@ files = ( 4A92DEA5223991B000C12799 /* alerts.json in Resources */, 4A92DEA82239997C00C12799 /* alerts_no_optionals.json in Resources */, + 4A92DEAE2239A32C00C12799 /* datapoint.json in Resources */, 4A92DEAB22399CF100C12799 /* flag.json in Resources */, D4D9F2B71C54061600A4A02F /* forecast.json in Resources */, 4A3364691CD9712000775650 /* forecast_no_optionals.json in Resources */, diff --git a/Tests/Resources/datapoint.json b/Tests/Resources/datapoint.json new file mode 100644 index 0000000..69e4d16 --- /dev/null +++ b/Tests/Resources/datapoint.json @@ -0,0 +1,20 @@ +{ + "time":1453575677, + "summary":"Snow", + "icon":"snow", + "nearestStormDistance":0, + "precipIntensity":0.0524, + "precipIntensityError":0, + "precipProbability":1, + "precipType":"snow", + "temperature":26.74, + "apparentTemperature":13.75, + "dewPoint":24.79, + "humidity":0.92, + "windSpeed":17.99, + "windBearing":10, + "visibility":1.25, + "cloudCover":0.55, + "pressure":1001.02, + "ozone":368.34 +}