Skip to content

Commit

Permalink
Added dedicated JSON for alerts testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sxg committed Mar 13, 2019
1 parent 69e190b commit b523c87
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ForecastIO.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
4A8B235C1D44807E00ACBAA8 /* forecast_bare.json in Resources */ = {isa = PBXBuildFile; fileRef = 4A14A6EE1CDAA80300D4C108 /* forecast_bare.json */; };
4A8B235D1D44807E00ACBAA8 /* forecast.json in Resources */ = {isa = PBXBuildFile; fileRef = D4D9F2B41C54061600A4A02F /* forecast.json */; };
4A8B235E1D44807E00ACBAA8 /* forecast_no_optionals.json in Resources */ = {isa = PBXBuildFile; fileRef = 4A3364661CD9712000775650 /* forecast_no_optionals.json */; };
4A92DEA422398FD300C12799 /* alerts.json in Resources */ = {isa = PBXBuildFile; fileRef = 4A92DEA322398FD300C12799 /* alerts.json */; };
4A92DEA5223991B000C12799 /* alerts.json in Resources */ = {isa = PBXBuildFile; fileRef = 4A92DEA322398FD300C12799 /* alerts.json */; };
4A92DEA7223997F900C12799 /* alerts_no_optionals.json in Resources */ = {isa = PBXBuildFile; fileRef = 4A92DEA6223997F900C12799 /* alerts_no_optionals.json */; };
4A92DEA82239997C00C12799 /* alerts_no_optionals.json in Resources */ = {isa = PBXBuildFile; fileRef = 4A92DEA6223997F900C12799 /* alerts_no_optionals.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 */; };
Expand Down Expand Up @@ -153,6 +157,8 @@
4A7AFEA31D98B9BA00568802 /* Result.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = "<group>"; };
4A7C1CD2206FFBBD0021A961 /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = "<group>"; };
4A8B23511D447FB300ACBAA8 /* ForecastIO iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ForecastIO iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
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; };
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; };
Expand Down Expand Up @@ -360,6 +366,8 @@
children = (
4A14A6EE1CDAA80300D4C108 /* forecast_bare.json */,
D4D9F2B41C54061600A4A02F /* forecast.json */,
4A92DEA322398FD300C12799 /* alerts.json */,
4A92DEA6223997F900C12799 /* alerts_no_optionals.json */,
4A3364661CD9712000775650 /* forecast_no_optionals.json */,
);
name = Resources;
Expand Down Expand Up @@ -644,6 +652,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4A92DEA422398FD300C12799 /* alerts.json in Resources */,
4A92DEA7223997F900C12799 /* alerts_no_optionals.json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -658,6 +668,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4A92DEA5223991B000C12799 /* alerts.json in Resources */,
4A92DEA82239997C00C12799 /* alerts_no_optionals.json in Resources */,
D4D9F2B71C54061600A4A02F /* forecast.json in Resources */,
4A3364691CD9712000775650 /* forecast_no_optionals.json in Resources */,
4A14A6F51CDAA80F00D4C108 /* forecast_bare.json in Resources */,
Expand Down
9 changes: 9 additions & 0 deletions Tests/Resources/alerts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"title":"High Wind Warning for Baltimore, MD",
"time":1453562580,
"expires":1453593600,
"description":"...HIGH WIND WARNING REMAINS IN EFFECT UNTIL 7 PM EST THIS\nEVENING...\n* TIMING...THROUGH TODAY.\n* WINDS...NORTH 25 TO 35 MPH WITH GUSTS UP TO 55 MPH.\n* IMPACTS...DOWNED TREES...POWERLINES...AND MINOR STRUCTURAL\nDAMAGE. DRIVING HIGH PROFILE VEHICLES IN THESE CONDITIONS IS\nDANGEROUS.\n",
"uri":"http://alerts.weather.gov/cap/wwacapget.php?x=MD1255E4FAA7AC.HighWindWarning.1255E5079700MD.LWXNPWLWX.b0aa96f59630770f05e80c219b873fd2",
"severity":"watch",
"regions": ["Eastern Bergen","Eastern Essex","Eastern Passaic","Eastern Union","Hudson","Western Bergen","Western Essex","Western Passaic","Western Union"]
}
8 changes: 8 additions & 0 deletions Tests/Resources/alerts_no_optionals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"title":"High Wind Warning for Baltimore, MD",
"time":1453562580,
"description":"...HIGH WIND WARNING REMAINS IN EFFECT UNTIL 7 PM EST THIS\nEVENING...\n* TIMING...THROUGH TODAY.\n* WINDS...NORTH 25 TO 35 MPH WITH GUSTS UP TO 55 MPH.\n* IMPACTS...DOWNED TREES...POWERLINES...AND MINOR STRUCTURAL\nDAMAGE. DRIVING HIGH PROFILE VEHICLES IN THESE CONDITIONS IS\nDANGEROUS.\n",
"uri":"http://alerts.weather.gov/cap/wwacapget.php?x=MD1255E4FAA7AC.HighWindWarning.1255E5079700MD.LWXNPWLWX.b0aa96f59630770f05e80c219b873fd2",
"severity":"watch",
"regions": ["Eastern Bergen","Eastern Essex","Eastern Passaic","Eastern Union","Hudson","Western Bergen","Western Essex","Western Passaic","Western Union"]
}

0 comments on commit b523c87

Please sign in to comment.