Javier Cicchelli 9bcdaa697b [Setup] Basic project structure (#1)
This PR contains all the work related to setting up this project as required to implement the [Assignment](https://repo.rock-n-code.com/rock-n-code/deep-linking-assignment/wiki/Assignment) on top, as intended.

To summarise this work:
- [x] created a new **Xcode** project;
- [x] cloned the `Wikipedia` app and inserted it into the **Xcode** project;
- [x] created the `Locations` app and also, its `Libraries` package;
- [x] created the `Shared` package to share dependencies between the apps;
- [x] added a `Makefile` file and implemented some **environment** and **help** commands.

Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Reviewed-on: rock-n-code/deep-linking-assignment#1
2023-04-08 18:37:13 +00:00

20 lines
1002 B
Swift

import XCTest
class WidgetSampleContentTests: XCTestCase {
func testFeaturedArticleWidgetSampleContentDecoding() throws {
let sampleContent = WidgetFeaturedContent.previewContent()
// Confirm JSON payload decodes correctly
XCTAssertNotNil(sampleContent, "Could not decode Featured Article Widget sample content JSON")
// Confirm content for display is available
XCTAssertNotNil(sampleContent?.featuredArticle?.displayTitle, "Featured Article Widget sample display title unavailable")
XCTAssertNotNil(sampleContent?.featuredArticle?.thumbnailImageSource?.data, "Featured Article Widget sample image unavailable")
XCTAssertNotNil(sampleContent?.featuredArticle?.contentURL.desktop.page, "Featured Article Widget sample content URL unavailable")
XCTAssertNotNil(sampleContent?.featuredArticle?.extract, "Featured Article Widget sample extract unavailable")
XCTAssertNotNil(sampleContent?.featuredArticle?.description, "Featured Article Widget sample description unavailable")
}
}