Last active
April 16, 2018 00:17
-
-
Save garsdle/feed2dd09cc6209f25c61c408a190518 to your computer and use it in GitHub Desktop.
Map Unit Testing
This file contains hidden or 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
func testJSONToUser() { | |
let userDictionary = mockUserAPI.getUserDictionary() | |
guard let user = UserMapper().map(userDictionary) else { | |
XCTFail("Failed to map User") | |
return | |
} | |
XCTAssert(user.id == 11235) | |
XCTAssert(user.name == "BobEsponja") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment