You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
added methods for checking initWithData
Just copied from SimpleDataErrorTests and replaced
stringWithContentsOfFile with dataWithContentsOfFile and init with data
accordingly
Added methods
jsonmodel#1. testErrorsInNestedModelsDictionary
jsonmodel#2. testErrorsInNestedModelsArray
jsonmodel#3. testMissingKeysError
jsonmodel#4. testTypeMismatchErrorImages
jsonmodel#5. testTypeMismatchErrorImagesObject
XCTAssertTrue(mismatchDescription, @"error does not have kJSONModelTypeMismatch key in user info");
115
+
XCTAssertTrue([mismatchDescription rangeOfString:@"'images'"].location != NSNotFound, @"error should mention that the 'images' property (expecting an Array) is mismatched.");
116
+
117
+
// Make sure that the error is at the expected key-path
118
+
XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"images", @"kJSONModelKeyPath does not contain the expected path of the error.");
XCTAssertTrue(mismatchDescription, @"error does not have kJSONModelTypeMismatch key in user info");
136
+
XCTAssertTrue([mismatchDescription rangeOfString:@"'imagesObject'"].location != NSNotFound, @"error should mention that the 'imagesObject' property (expecting a Dictionary) is mismatched.");
137
+
138
+
// Make sure that the error is at the expected key-path
139
+
XCTAssertEqualObjects(err.userInfo[kJSONModelKeyPath], @"imagesObject", @"kJSONModelKeyPath does not contain the expected path of the error.");
0 commit comments