-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add metadata parsing and tests
- Update `MetaDataMapper.swift` to support mapping from a nested data response. - Add tests in `MetaDataMapperTests.swift` for the new mapping functionality. - Create `meta-data-products-and-orders_nested_in_data.json` for testing. - Modify function signatures in `MetaDataStore.swift` for consistency.
- Loading branch information
Showing
5 changed files
with
92 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
Networking/NetworkingTests/Responses/meta-data-products-and-orders_nested_in_data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"data":{ | ||
"meta_data":[ | ||
{ | ||
"id":1, | ||
"key":"lorem_key_1", | ||
"value":"Lorem ipsum" | ||
}, | ||
{ | ||
"id":2, | ||
"key":"ipsum_key_2", | ||
"value":"dolor sit amet" | ||
}, | ||
{ | ||
"id":3, | ||
"key":"dolor_key_3", | ||
"value":"consectetur adipiscing elit" | ||
}, | ||
{ | ||
"id":4, | ||
"key":"sit_key_4", | ||
"value":"Nisi ut aliquip" | ||
}, | ||
{ | ||
"id":5, | ||
"key":"_internal_key", | ||
"value":"In voluptate velit" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters