mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 04:20:21 +08:00
Raise an assertion in the event a mapping test is invoked with a mapping containing a nil
target object class.
This commit is contained in:
@@ -156,6 +156,8 @@ BOOL RKObjectIsValueEqualToValue(id sourceValue, id destinationValue);
|
||||
}
|
||||
|
||||
- (void)performMapping {
|
||||
NSAssert(self.mapping.objectClass, @"Cannot test a mapping that does not have a destination objectClass");
|
||||
|
||||
// Ensure repeated invocations of verify only result in a single mapping operation
|
||||
if (! self.hasPerformedMapping) {
|
||||
id sourceObject = self.rootKeyPath ? [self.sourceObject valueForKeyPath:self.rootKeyPath] : self.sourceObject;
|
||||
|
||||
Reference in New Issue
Block a user