Add assertions to RKMIMETypeSerialization and RKTestFixture

This commit is contained in:
Blake Watters
2013-03-14 11:49:22 -04:00
parent 10ad79a352
commit 8ff6f62297
2 changed files with 8 additions and 5 deletions

View File

@@ -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) {