mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-06-19 01:56:29 +08:00
Add better description output to RKMappingTest
This commit is contained in:
@@ -68,7 +68,8 @@ BOOL RKObjectIsValueEqualToValue(id sourceValue, id destinationValue);
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"%@: mapped sourceKeyPath '%@' => destinationKeyPath '%@' with value: %@", [self class], self.sourceKeyPath, self.destinationKeyPath, self.value];
|
||||
return [NSString stringWithFormat:@"%@ mapped sourceKeyPath '%@' => destinationKeyPath '%@' with value: %@>", [self class],
|
||||
self.sourceKeyPath, self.destinationKeyPath, self.value];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -228,6 +229,22 @@ BOOL RKObjectIsValueEqualToValue(id sourceValue, id destinationValue);
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString *)expectationsDescription
|
||||
{
|
||||
return [self.expectations valueForKey:@"description"];
|
||||
}
|
||||
|
||||
- (NSString *)eventsDescription
|
||||
{
|
||||
return [self.events valueForKey:@"description"];
|
||||
}
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"%@ Expectations: %@\nEvents: %@",
|
||||
[self class], [self expectationsDescription], [self eventsDescription]];
|
||||
}
|
||||
|
||||
#pragma mark - RKObjecMappingOperationDelegate
|
||||
|
||||
- (void)addEvent:(RKMappingTestEvent *)event
|
||||
|
||||
Reference in New Issue
Block a user