mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-06-19 18:24:12 +08:00
Add assertions to RKMIMETypeSerialization and RKTestFixture
This commit is contained in:
@@ -146,6 +146,9 @@
|
||||
|
||||
+ (id)objectFromData:(NSData *)data MIMEType:(NSString *)MIMEType error:(NSError **)error
|
||||
{
|
||||
NSParameterAssert(data);
|
||||
NSParameterAssert(MIMEType);
|
||||
|
||||
Class<RKSerialization> serializationClass = [self serializationClassForMIMEType:MIMEType];
|
||||
if (!serializationClass) {
|
||||
if (error) {
|
||||
@@ -161,6 +164,8 @@
|
||||
|
||||
+ (id)dataFromObject:(id)object MIMEType:(NSString *)MIMEType error:(NSError **)error
|
||||
{
|
||||
NSParameterAssert(object);
|
||||
NSParameterAssert(MIMEType);
|
||||
Class<RKSerialization> serializationClass = [self serializationClassForMIMEType:MIMEType];
|
||||
if (!serializationClass) {
|
||||
if (error) {
|
||||
|
||||
Reference in New Issue
Block a user