Port passing Logic Test coverage to ARC

This commit is contained in:
Blake Watters
2012-09-26 11:35:16 -04:00
parent 39f78d2cac
commit d195ea873c
30 changed files with 249 additions and 295 deletions

View File

@@ -267,7 +267,7 @@
251610D21456F2330060A5C5 /* RKDynamicObjectMappingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2516101C1456F2330060A5C5 /* RKDynamicObjectMappingTest.m */; };
251610D31456F2330060A5C5 /* RKDynamicObjectMappingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2516101C1456F2330060A5C5 /* RKDynamicObjectMappingTest.m */; };
251610DC1456F2330060A5C5 /* RKObjectMappingNextGenTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 251610211456F2330060A5C5 /* RKObjectMappingNextGenTest.m */; };
251610DD1456F2330060A5C5 /* RKObjectMappingNextGenTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 251610211456F2330060A5C5 /* RKObjectMappingNextGenTest.m */; };
251610DD1456F2330060A5C5 /* RKObjectMappingNextGenTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 251610211456F2330060A5C5 /* RKObjectMappingNextGenTest.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
251610DE1456F2330060A5C5 /* RKObjectMappingOperationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 251610221456F2330060A5C5 /* RKObjectMappingOperationTest.m */; };
251610DF1456F2330060A5C5 /* RKObjectMappingOperationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 251610221456F2330060A5C5 /* RKObjectMappingOperationTest.m */; };
251610E21456F2330060A5C5 /* RKObjectMappingResultTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 251610241456F2330060A5C5 /* RKObjectMappingResultTest.m */; };
@@ -473,10 +473,10 @@
25AA23D115AF2920006EF62D /* RKManagedObjectMappingOperationDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 25AA23CF15AF291F006EF62D /* RKManagedObjectMappingOperationDataSource.m */; };
25AA23D815AF5085006EF62D /* RKManagedObjectMappingOperationDataSourceTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 25AA23D315AF4F25006EF62D /* RKManagedObjectMappingOperationDataSourceTest.m */; };
25AA23D915AF5086006EF62D /* RKManagedObjectMappingOperationDataSourceTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 25AA23D315AF4F25006EF62D /* RKManagedObjectMappingOperationDataSourceTest.m */; };
25AE61C615ADE9E500B319C8 /* OCClassMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25AE61BE15ADE9E500B319C8 /* OCClassMockRecorder.m */; };
25AE61C715ADE9E500B319C8 /* OCClassMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25AE61BE15ADE9E500B319C8 /* OCClassMockRecorder.m */; };
25AE61C815ADE9E500B319C8 /* OCMockClassObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25AE61C315ADE9E500B319C8 /* OCMockClassObject.m */; };
25AE61C915ADE9E500B319C8 /* OCMockClassObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25AE61C315ADE9E500B319C8 /* OCMockClassObject.m */; };
25AE61C615ADE9E500B319C8 /* OCClassMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25AE61BE15ADE9E500B319C8 /* OCClassMockRecorder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25AE61C715ADE9E500B319C8 /* OCClassMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25AE61BE15ADE9E500B319C8 /* OCClassMockRecorder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25AE61C815ADE9E500B319C8 /* OCMockClassObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25AE61C315ADE9E500B319C8 /* OCMockClassObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25AE61C915ADE9E500B319C8 /* OCMockClassObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25AE61C315ADE9E500B319C8 /* OCMockClassObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25AE61CA15ADEBD000B319C8 /* RKConnectionMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC044C81576CE72003DCDD6 /* RKConnectionMapping.h */; settings = {ATTRIBUTES = (Public, ); }; };
25AE61DE15ADEF5800B319C8 /* RKConnectionMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BC044C91576CE72003DCDD6 /* RKConnectionMapping.m */; };
25AFF8F115B4CF1F0051877F /* RKMappingErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = 25AFF8F015B4CF1F0051877F /* RKMappingErrors.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -495,50 +495,50 @@
25B6E95F14CF7E3C00B1E881 /* RKDynamicMappingMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E95B14CF7E3C00B1E881 /* RKDynamicMappingMatcher.m */; };
25B6E9A414CF829400B1E881 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 25B6E97B14CF829400B1E881 /* InfoPlist.strings */; };
25B6E9A514CF829400B1E881 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 25B6E97B14CF829400B1E881 /* InfoPlist.strings */; };
25B6E9A614CF829400B1E881 /* NSInvocation+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E97E14CF829400B1E881 /* NSInvocation+OCMAdditions.m */; };
25B6E9A714CF829400B1E881 /* NSInvocation+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E97E14CF829400B1E881 /* NSInvocation+OCMAdditions.m */; };
25B6E9A814CF829400B1E881 /* NSMethodSignature+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98014CF829400B1E881 /* NSMethodSignature+OCMAdditions.m */; };
25B6E9A914CF829400B1E881 /* NSMethodSignature+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98014CF829400B1E881 /* NSMethodSignature+OCMAdditions.m */; };
25B6E9AA14CF829400B1E881 /* NSNotificationCenter+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98114CF829400B1E881 /* NSNotificationCenter+OCMAdditions.m */; };
25B6E9AB14CF829400B1E881 /* NSNotificationCenter+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98114CF829400B1E881 /* NSNotificationCenter+OCMAdditions.m */; };
25B6E9AC14CF829400B1E881 /* OCClassMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98314CF829400B1E881 /* OCClassMockObject.m */; };
25B6E9AD14CF829400B1E881 /* OCClassMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98314CF829400B1E881 /* OCClassMockObject.m */; };
25B6E9AE14CF829400B1E881 /* OCMArg.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98414CF829400B1E881 /* OCMArg.m */; };
25B6E9AF14CF829400B1E881 /* OCMArg.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98414CF829400B1E881 /* OCMArg.m */; };
25B6E9B014CF829400B1E881 /* OCMBlockCaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98614CF829400B1E881 /* OCMBlockCaller.m */; };
25B6E9B114CF829400B1E881 /* OCMBlockCaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98614CF829400B1E881 /* OCMBlockCaller.m */; };
25B6E9B214CF829400B1E881 /* OCMBoxedReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98814CF829400B1E881 /* OCMBoxedReturnValueProvider.m */; };
25B6E9B314CF829400B1E881 /* OCMBoxedReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98814CF829400B1E881 /* OCMBoxedReturnValueProvider.m */; };
25B6E9B414CF829400B1E881 /* OCMConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98914CF829400B1E881 /* OCMConstraint.m */; };
25B6E9B514CF829400B1E881 /* OCMConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98914CF829400B1E881 /* OCMConstraint.m */; };
25B6E9B614CF829400B1E881 /* OCMExceptionReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98B14CF829400B1E881 /* OCMExceptionReturnValueProvider.m */; };
25B6E9B714CF829400B1E881 /* OCMExceptionReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98B14CF829400B1E881 /* OCMExceptionReturnValueProvider.m */; };
25B6E9B814CF829400B1E881 /* OCMIndirectReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98D14CF829400B1E881 /* OCMIndirectReturnValueProvider.m */; };
25B6E9B914CF829400B1E881 /* OCMIndirectReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98D14CF829400B1E881 /* OCMIndirectReturnValueProvider.m */; };
25B6E9BA14CF829400B1E881 /* OCMNotificationPoster.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98F14CF829400B1E881 /* OCMNotificationPoster.m */; };
25B6E9BB14CF829400B1E881 /* OCMNotificationPoster.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98F14CF829400B1E881 /* OCMNotificationPoster.m */; };
25B6E9BC14CF829400B1E881 /* OCMObserverRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99114CF829400B1E881 /* OCMObserverRecorder.m */; };
25B6E9BD14CF829400B1E881 /* OCMObserverRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99114CF829400B1E881 /* OCMObserverRecorder.m */; };
25B6E9A614CF829400B1E881 /* NSInvocation+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E97E14CF829400B1E881 /* NSInvocation+OCMAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9A714CF829400B1E881 /* NSInvocation+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E97E14CF829400B1E881 /* NSInvocation+OCMAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9A814CF829400B1E881 /* NSMethodSignature+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98014CF829400B1E881 /* NSMethodSignature+OCMAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9A914CF829400B1E881 /* NSMethodSignature+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98014CF829400B1E881 /* NSMethodSignature+OCMAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9AA14CF829400B1E881 /* NSNotificationCenter+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98114CF829400B1E881 /* NSNotificationCenter+OCMAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9AB14CF829400B1E881 /* NSNotificationCenter+OCMAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98114CF829400B1E881 /* NSNotificationCenter+OCMAdditions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9AC14CF829400B1E881 /* OCClassMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98314CF829400B1E881 /* OCClassMockObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9AD14CF829400B1E881 /* OCClassMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98314CF829400B1E881 /* OCClassMockObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9AE14CF829400B1E881 /* OCMArg.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98414CF829400B1E881 /* OCMArg.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9AF14CF829400B1E881 /* OCMArg.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98414CF829400B1E881 /* OCMArg.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9B014CF829400B1E881 /* OCMBlockCaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98614CF829400B1E881 /* OCMBlockCaller.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9B114CF829400B1E881 /* OCMBlockCaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98614CF829400B1E881 /* OCMBlockCaller.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9B214CF829400B1E881 /* OCMBoxedReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98814CF829400B1E881 /* OCMBoxedReturnValueProvider.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9B314CF829400B1E881 /* OCMBoxedReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98814CF829400B1E881 /* OCMBoxedReturnValueProvider.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9B414CF829400B1E881 /* OCMConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98914CF829400B1E881 /* OCMConstraint.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9B514CF829400B1E881 /* OCMConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98914CF829400B1E881 /* OCMConstraint.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9B614CF829400B1E881 /* OCMExceptionReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98B14CF829400B1E881 /* OCMExceptionReturnValueProvider.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9B714CF829400B1E881 /* OCMExceptionReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98B14CF829400B1E881 /* OCMExceptionReturnValueProvider.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9B814CF829400B1E881 /* OCMIndirectReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98D14CF829400B1E881 /* OCMIndirectReturnValueProvider.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9B914CF829400B1E881 /* OCMIndirectReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98D14CF829400B1E881 /* OCMIndirectReturnValueProvider.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9BA14CF829400B1E881 /* OCMNotificationPoster.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98F14CF829400B1E881 /* OCMNotificationPoster.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9BB14CF829400B1E881 /* OCMNotificationPoster.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E98F14CF829400B1E881 /* OCMNotificationPoster.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9BC14CF829400B1E881 /* OCMObserverRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99114CF829400B1E881 /* OCMObserverRecorder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9BD14CF829400B1E881 /* OCMObserverRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99114CF829400B1E881 /* OCMObserverRecorder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9BE14CF829400B1E881 /* OCMock-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 25B6E99214CF829400B1E881 /* OCMock-Info.plist */; };
25B6E9BF14CF829400B1E881 /* OCMock-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 25B6E99214CF829400B1E881 /* OCMock-Info.plist */; };
25B6E9C014CF829400B1E881 /* OCMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99414CF829400B1E881 /* OCMockObject.m */; };
25B6E9C114CF829400B1E881 /* OCMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99414CF829400B1E881 /* OCMockObject.m */; };
25B6E9C214CF829400B1E881 /* OCMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99514CF829400B1E881 /* OCMockRecorder.m */; };
25B6E9C314CF829400B1E881 /* OCMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99514CF829400B1E881 /* OCMockRecorder.m */; };
25B6E9C414CF829400B1E881 /* OCMPassByRefSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99714CF829400B1E881 /* OCMPassByRefSetter.m */; };
25B6E9C514CF829400B1E881 /* OCMPassByRefSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99714CF829400B1E881 /* OCMPassByRefSetter.m */; };
25B6E9C614CF829400B1E881 /* OCMRealObjectForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99914CF829400B1E881 /* OCMRealObjectForwarder.m */; };
25B6E9C714CF829400B1E881 /* OCMRealObjectForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99914CF829400B1E881 /* OCMRealObjectForwarder.m */; };
25B6E9C814CF829400B1E881 /* OCMReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99B14CF829400B1E881 /* OCMReturnValueProvider.m */; };
25B6E9C914CF829400B1E881 /* OCMReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99B14CF829400B1E881 /* OCMReturnValueProvider.m */; };
25B6E9CA14CF829400B1E881 /* OCObserverMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99D14CF829400B1E881 /* OCObserverMockObject.m */; };
25B6E9CB14CF829400B1E881 /* OCObserverMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99D14CF829400B1E881 /* OCObserverMockObject.m */; };
25B6E9CC14CF829400B1E881 /* OCPartialMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99F14CF829400B1E881 /* OCPartialMockObject.m */; };
25B6E9CD14CF829400B1E881 /* OCPartialMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99F14CF829400B1E881 /* OCPartialMockObject.m */; };
25B6E9CE14CF829400B1E881 /* OCPartialMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E9A114CF829400B1E881 /* OCPartialMockRecorder.m */; };
25B6E9CF14CF829400B1E881 /* OCPartialMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E9A114CF829400B1E881 /* OCPartialMockRecorder.m */; };
25B6E9D014CF829400B1E881 /* OCProtocolMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E9A314CF829400B1E881 /* OCProtocolMockObject.m */; };
25B6E9D114CF829400B1E881 /* OCProtocolMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E9A314CF829400B1E881 /* OCProtocolMockObject.m */; };
25B6E9C014CF829400B1E881 /* OCMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99414CF829400B1E881 /* OCMockObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9C114CF829400B1E881 /* OCMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99414CF829400B1E881 /* OCMockObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9C214CF829400B1E881 /* OCMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99514CF829400B1E881 /* OCMockRecorder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9C314CF829400B1E881 /* OCMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99514CF829400B1E881 /* OCMockRecorder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9C414CF829400B1E881 /* OCMPassByRefSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99714CF829400B1E881 /* OCMPassByRefSetter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9C514CF829400B1E881 /* OCMPassByRefSetter.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99714CF829400B1E881 /* OCMPassByRefSetter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9C614CF829400B1E881 /* OCMRealObjectForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99914CF829400B1E881 /* OCMRealObjectForwarder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9C714CF829400B1E881 /* OCMRealObjectForwarder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99914CF829400B1E881 /* OCMRealObjectForwarder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9C814CF829400B1E881 /* OCMReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99B14CF829400B1E881 /* OCMReturnValueProvider.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9C914CF829400B1E881 /* OCMReturnValueProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99B14CF829400B1E881 /* OCMReturnValueProvider.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9CA14CF829400B1E881 /* OCObserverMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99D14CF829400B1E881 /* OCObserverMockObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9CB14CF829400B1E881 /* OCObserverMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99D14CF829400B1E881 /* OCObserverMockObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9CC14CF829400B1E881 /* OCPartialMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99F14CF829400B1E881 /* OCPartialMockObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9CD14CF829400B1E881 /* OCPartialMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E99F14CF829400B1E881 /* OCPartialMockObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9CE14CF829400B1E881 /* OCPartialMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E9A114CF829400B1E881 /* OCPartialMockRecorder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9CF14CF829400B1E881 /* OCPartialMockRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E9A114CF829400B1E881 /* OCPartialMockRecorder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9D014CF829400B1E881 /* OCProtocolMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E9A314CF829400B1E881 /* OCProtocolMockObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9D114CF829400B1E881 /* OCProtocolMockObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E9A314CF829400B1E881 /* OCProtocolMockObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25B6E9DB14CF912500B1E881 /* RKSearchable.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E9D614CF912500B1E881 /* RKSearchable.m */; };
25B6E9DC14CF912500B1E881 /* RKSearchable.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E9D614CF912500B1E881 /* RKSearchable.m */; };
25B6E9DD14CF912500B1E881 /* RKTestAddress.m in Sources */ = {isa = PBXBuildFile; fileRef = 25B6E9D814CF912500B1E881 /* RKTestAddress.m */; };
@@ -2724,6 +2724,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
@@ -2747,6 +2748,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
@@ -2796,6 +2798,7 @@
25160D3E14564E820060A5C5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_OBJCPP_ARC_ABI = YES;
FRAMEWORK_SEARCH_PATHS = (
"\"$(SDKROOT)/Developer/Library/Frameworks\"",
@@ -2819,6 +2822,7 @@
25160D3F14564E820060A5C5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_OBJCPP_ARC_ABI = YES;
FRAMEWORK_SEARCH_PATHS = (
"\"$(SDKROOT)/Developer/Library/Frameworks\"",
@@ -2899,6 +2903,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
@@ -2927,6 +2932,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (

View File

@@ -34,7 +34,7 @@
- (void)testFetchObjectForEntityForNameWithValueForPrimaryKeyAttribute
{
RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore];
NSManagedObjectContext *context = [[[RKTestFactory managedObjectStore] newChildManagedObjectContextWithConcurrencyType:NSMainQueueConcurrencyType] autorelease];
NSManagedObjectContext *context = [[RKTestFactory managedObjectStore] newChildManagedObjectContextWithConcurrencyType:NSMainQueueConcurrencyType];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"RKHuman" inManagedObjectContext:managedObjectStore.primaryManagedObjectContext];
entity.primaryKeyAttributeName = @"railsID";

View File

@@ -13,9 +13,9 @@
#import "RKChild.h"
@interface RKEntityByAttributeCacheTest : RKTestCase
@property (nonatomic, retain) RKManagedObjectStore *managedObjectStore;
@property (nonatomic, readonly) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, retain) RKEntityByAttributeCache *cache;
@property (nonatomic, strong) RKManagedObjectStore *managedObjectStore;
@property (weak, nonatomic, readonly) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, strong) RKEntityByAttributeCache *cache;
@end
@implementation RKEntityByAttributeCacheTest
@@ -123,7 +123,7 @@
[self.managedObjectStore.primaryManagedObjectContext save:nil];
[self.cache load];
NSManagedObjectContext *childContext = [[[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType] autorelease];
NSManagedObjectContext *childContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
childContext.parentContext = self.managedObjectContext;
NSManagedObject *object = [self.cache objectWithAttributeValue:[NSNumber numberWithInteger:12345] inContext:childContext];
assertThat(object.objectID, is(equalTo(human.objectID)));
@@ -136,7 +136,7 @@
[self.managedObjectStore.primaryManagedObjectContext save:nil];
[self.cache load];
NSManagedObjectContext *childContext = [[[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType] autorelease];
NSManagedObjectContext *childContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
childContext.parentContext = self.managedObjectContext;
NSManagedObject *object = [self.cache objectWithAttributeValue:@"12345" inContext:childContext];
assertThat(object, is(notNilValue()));
@@ -154,7 +154,7 @@
[self.cache addObject:human1];
[self.cache addObject:human2];
NSManagedObjectContext *childContext = [[[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType] autorelease];
NSManagedObjectContext *childContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
childContext.parentContext = self.managedObjectContext;
NSArray *objects = [self.cache objectsWithAttributeValue:[NSNumber numberWithInt:12345] inContext:childContext];
assertThat(objects, hasCountOf(2));

View File

@@ -13,9 +13,9 @@
#import "RKHuman.h"
@interface RKEntityCacheTest : RKTestCase
@property (nonatomic, retain) RKManagedObjectStore *managedObjectStore;
@property (nonatomic, retain) RKEntityCache *cache;
@property (nonatomic, retain) NSEntityDescription *entity;
@property (nonatomic, strong) RKManagedObjectStore *managedObjectStore;
@property (nonatomic, strong) RKEntityCache *cache;
@property (nonatomic, strong) NSEntityDescription *entity;
@end
@implementation RKEntityCacheTest
@@ -76,7 +76,7 @@
[self.managedObjectStore.primaryManagedObjectContext save:&error];
[_cache cacheObjectsForEntity:self.entity byAttribute:@"railsID"];
NSManagedObjectContext *childContext = [[[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType] autorelease];
NSManagedObjectContext *childContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
childContext.parentContext = self.managedObjectStore.primaryManagedObjectContext;
NSManagedObject *fetchedObject = [self.cache objectForEntity:self.entity withAttribute:@"railsID" value:[NSNumber numberWithInteger:12345] inContext:childContext];
assertThat(fetchedObject, is(notNilValue()));
@@ -92,7 +92,7 @@
[self.managedObjectStore.primaryManagedObjectContext save:&error];
[_cache cacheObjectsForEntity:self.entity byAttribute:@"railsID"];
NSManagedObjectContext *childContext = [[[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType] autorelease];
NSManagedObjectContext *childContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
childContext.parentContext = self.managedObjectStore.primaryManagedObjectContext;
NSArray *objects = [self.cache objectsForEntity:self.entity withAttribute:@"railsID" value:[NSNumber numberWithInteger:12345] inContext:childContext];
assertThat(objects, hasCountOf(2));
@@ -112,7 +112,7 @@
[_cache cacheObjectsForEntity:self.entity byAttribute:@"railsID"];
[_cache cacheObjectsForEntity:self.entity byAttribute:@"name"];
NSManagedObjectContext *childContext = [[[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType] autorelease];
NSManagedObjectContext *childContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
childContext.parentContext = self.managedObjectStore.primaryManagedObjectContext;
NSArray *objects = [self.cache objectsForEntity:self.entity withAttribute:@"railsID" value:[NSNumber numberWithInteger:12345] inContext:childContext];
@@ -152,7 +152,7 @@
[_cache addObject:human1];
[_cache addObject:human2];
NSManagedObjectContext *childContext = [[[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType] autorelease];
NSManagedObjectContext *childContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
childContext.parentContext = self.managedObjectStore.primaryManagedObjectContext;
NSArray *objects = [self.cache objectsForEntity:self.entity withAttribute:@"railsID" value:[NSNumber numberWithInteger:12345] inContext:childContext];
@@ -186,7 +186,7 @@
[_cache addObject:human1];
[_cache addObject:human2];
NSManagedObjectContext *childContext = [[[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType] autorelease];
NSManagedObjectContext *childContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
childContext.parentContext = self.managedObjectStore.primaryManagedObjectContext;
NSArray *objects = [self.cache objectsForEntity:self.entity withAttribute:@"railsID" value:[NSNumber numberWithInteger:12345] inContext:childContext];

View File

@@ -59,7 +59,6 @@
assertThat(persistentStore, is(notNilValue()));
BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:seedPath];
assertThatBool(fileExists, is(equalToBool(YES)));
[seedStore release];
// Create a secondary store using the seed
RKManagedObjectStore *managedObjectStore = [[RKManagedObjectStore alloc] init];
@@ -73,7 +72,6 @@
// Check that the store has a reference to the seed file option
NSString *seedDatabasePath = [[persistentStore options] valueForKey:RKSQLitePersistentStoreSeedDatabasePathOption];
assertThat(seedDatabasePath, is(equalTo(seedPath)));
[managedObjectStore release];
}
- (void)testAddingPersistentSQLiteStoreFromSeedDatabase
@@ -90,7 +88,6 @@
BOOL success = [seedStore.mainQueueManagedObjectContext saveToPersistentStore:&error];
assertThatBool(success, is(equalToBool(YES)));
NSManagedObjectID *seedObjectID = human.objectID;
[seedStore release];
// Create a secondary store using the first store as the seed
NSString *storePath = [RKApplicationDataDirectory() stringByAppendingPathComponent:@"SeededStore.sqlite"];
@@ -106,7 +103,6 @@
assertThat(array, isNot(empty()));
RKHuman *seededHuman = [array objectAtIndex:0];
assertThat([[seededHuman.objectID URIRepresentation] URLByDeletingLastPathComponent], is(equalTo([[seedObjectID URIRepresentation] URLByDeletingLastPathComponent])));
[seededStore release];
}
- (void)testResetPersistentStoresRecreatesInMemoryStoreThusDeletingAllManagedObjects
@@ -136,7 +132,6 @@
fetchRequest.predicate = [NSPredicate predicateWithFormat:@"name = %@", @"Blake"];
NSArray *array = [managedObjectStore.mainQueueManagedObjectContext executeFetchRequest:fetchRequest error:&error];
assertThat(array, is(empty()));
[managedObjectStore release];
}
- (void)testResetPersistentStoresRecreatesSQLiteStoreThusDeletingAllManagedObjects
@@ -163,7 +158,6 @@
fetchRequest.predicate = [NSPredicate predicateWithFormat:@"name = %@", @"Blake"];
NSArray *array = [managedObjectStore.mainQueueManagedObjectContext executeFetchRequest:fetchRequest error:&error];
assertThat(array, is(empty()));
[managedObjectStore release];
}
@@ -193,7 +187,6 @@
NSDate *laterDate = [modificationDate laterDate:newModificationDate];
assertThat(laterDate, is(equalTo(newModificationDate)));
[managedObjectStore release];
}
- (void)testResetPersistentStoreForSQLiteStoreSeededWithDatabaseReclonesTheSeedDatabaseToTheStoreLocation
@@ -210,7 +203,6 @@
BOOL success = [seedStore.mainQueueManagedObjectContext saveToPersistentStore:&error];
assertThatBool(success, is(equalToBool(YES)));
NSManagedObjectID *seedObjectID = human.objectID;
[seedStore release];
// Create a secondary store using the first store as the seed
NSString *storePath = [RKApplicationDataDirectory() stringByAppendingPathComponent:@"SeededStore.sqlite"];
@@ -242,7 +234,6 @@
fetchRequest.predicate = [NSPredicate predicateWithFormat:@"name = %@", @"Sarah"];
array = [seededStore.primaryManagedObjectContext executeFetchRequest:fetchRequest error:&error];
assertThat(array, is(empty()));
[seededStore release];
}
@end

View File

@@ -154,28 +154,27 @@
- (void)createBackgroundObjects
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
assertThatBool([NSThread isMainThread], equalToBool(NO));
@autoreleasepool {
assertThatBool([NSThread isMainThread], equalToBool(NO));
// Assert this is not the main thread
// Create a new array of objects in the background
RKObjectManager *objectManager = [RKTestFactory objectManager];
RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore];
objectManager.managedObjectStore = managedObjectStore;
NSArray *humans = [NSArray arrayWithObject:[NSEntityDescription entityForName:@"RKHuman" inManagedObjectContext:managedObjectStore.primaryManagedObjectContext]];
_dictionary = [[NSMutableDictionary dictionaryWithObject:humans forKey:@"humans"] retain];
NSMethodSignature *signature = [self methodSignatureForSelector:@selector(informDelegateWithDictionary:)];
RKManagedObjectThreadSafeInvocation *invocation = [RKManagedObjectThreadSafeInvocation invocationWithMethodSignature:signature];
invocation.privateQueueManagedObjectContext = _objectStore.primaryManagedObjectContext;
invocation.mainQueueManagedObjectContext = _objectStore.mainQueueManagedObjectContext;
[invocation retain];
[invocation setTarget:self];
[invocation setSelector:@selector(informDelegateWithDictionary:)];
[invocation setArgument:&_dictionary atIndex:2]; // NOTE: _cmd and self are 0 and 1
[invocation setManagedObjectKeyPaths:[NSSet setWithObject:@"humans"] forArgument:2];
[invocation invokeOnMainThread];
// Assert this is not the main thread
// Create a new array of objects in the background
RKObjectManager *objectManager = [RKTestFactory objectManager];
RKManagedObjectStore *managedObjectStore = [RKTestFactory managedObjectStore];
objectManager.managedObjectStore = managedObjectStore;
NSArray *humans = [NSArray arrayWithObject:[NSEntityDescription entityForName:@"RKHuman" inManagedObjectContext:managedObjectStore.primaryManagedObjectContext]];
_dictionary = [NSMutableDictionary dictionaryWithObject:humans forKey:@"humans"];
NSMethodSignature *signature = [self methodSignatureForSelector:@selector(informDelegateWithDictionary:)];
RKManagedObjectThreadSafeInvocation *invocation = [RKManagedObjectThreadSafeInvocation invocationWithMethodSignature:signature];
invocation.privateQueueManagedObjectContext = _objectStore.primaryManagedObjectContext;
invocation.mainQueueManagedObjectContext = _objectStore.mainQueueManagedObjectContext;
[invocation setTarget:self];
[invocation setSelector:@selector(informDelegateWithDictionary:)];
[invocation setArgument:&_dictionary atIndex:2]; // NOTE: _cmd and self are 0 and 1
[invocation setManagedObjectKeyPaths:[NSSet setWithObject:@"humans"] forArgument:2];
[invocation invokeOnMainThread];
[pool drain];
}
}
@end

View File

@@ -272,7 +272,7 @@
[router addRoute:[RKRoute routeWithClass:[RKTestObject class] pathPattern:@"/users/:userID" method:RKRequestMethodPOST]];
[router addRoute:[RKRoute routeWithClass:[RKTestSubclassedObject class] pathPattern:@"/users/:userID" method:RKRequestMethodGET]];
RKTestSubclassedObject *subclassed = [[RKTestSubclassedObject new] autorelease];
RKTestSubclassedObject *subclassed = [RKTestSubclassedObject new];
NSArray *routes = [router routesForObject:subclassed];
assertThat(routes, hasCountOf(3));
}
@@ -284,7 +284,7 @@
[router addRoute:[RKRoute routeWithClass:[RKTestObject class] pathPattern:@"/users/:userID/2" method:RKRequestMethodPOST]];
[router addRoute:[RKRoute routeWithClass:[RKTestSubclassedObject class] pathPattern:@"/users/:userID/3" method:RKRequestMethodGET]];
RKTestSubclassedObject *subclassed = [[RKTestSubclassedObject new] autorelease];
RKTestSubclassedObject *subclassed = [RKTestSubclassedObject new];
RKRoute *route = [router routeForObject:subclassed method:RKRequestMethodGET];
assertThat(route.objectClass, is(equalTo([RKTestSubclassedObject class])));
assertThatInteger(route.method, is(equalToInteger(RKRequestMethodGET)));
@@ -298,7 +298,7 @@
[router addRoute:[RKRoute routeWithClass:[RKTestObject class] pathPattern:@"/users/:userID/2" method:RKRequestMethodPOST]];
[router addRoute:[RKRoute routeWithClass:[RKTestSubclassedObject class] pathPattern:@"/users/:userID/3" method:RKRequestMethodAny]];
RKTestSubclassedObject *subclassed = [[RKTestSubclassedObject new] autorelease];
RKTestSubclassedObject *subclassed = [RKTestSubclassedObject new];
RKRoute *route = [router routeForObject:subclassed method:RKRequestMethodGET];
assertThat(route.objectClass, is(equalTo([RKTestSubclassedObject class])));
assertThatInteger(route.method, is(equalToInteger(RKRequestMethodAny)));
@@ -311,7 +311,7 @@
[router addRoute:[RKRoute routeWithClass:[RKTestObject class] pathPattern:@"/users/:userID/1" method:RKRequestMethodGET]];
[router addRoute:[RKRoute routeWithClass:[RKTestObject class] pathPattern:@"/users/:userID/2" method:RKRequestMethodAny]];
RKTestSubclassedObject *subclassed = [[RKTestSubclassedObject new] autorelease];
RKTestSubclassedObject *subclassed = [RKTestSubclassedObject new];
RKRoute *route = [router routeForObject:subclassed method:RKRequestMethodGET];
assertThat(route.objectClass, is(equalTo([RKTestObject class])));
assertThatInteger(route.method, is(equalToInteger(RKRequestMethodGET)));
@@ -324,7 +324,7 @@
[router addRoute:[RKRoute routeWithClass:[RKTestObject class] pathPattern:@"/users/:userID/1" method:RKRequestMethodGET]];
[router addRoute:[RKRoute routeWithClass:[RKTestObject class] pathPattern:@"/users/:userID/2" method:RKRequestMethodAny]];
RKTestSubclassedObject *subclassed = [[RKTestSubclassedObject new] autorelease];
RKTestSubclassedObject *subclassed = [RKTestSubclassedObject new];
RKRoute *route = [router routeForObject:subclassed method:RKRequestMethodPOST];
assertThat(route.objectClass, is(equalTo([RKTestObject class])));
assertThatInteger(route.method, is(equalToInteger(RKRequestMethodAny)));

View File

@@ -62,7 +62,7 @@
+ (RKExampleGroupWithUserArray *)group
{
return [[self new] autorelease];
return [self new];
}
// isEqual: is consulted by the mapping operation
@@ -95,7 +95,7 @@
+ (RKExampleGroupWithUserSet *)group
{
return [[self new] autorelease];
return [self new];
}
// isEqual: is consulted by the mapping operation
@@ -225,11 +225,10 @@
[mapping addPropertyMapping:nameMapping];
RKMapperOperation *mapper = [RKMapperOperation new];
mapper.mappingOperationDataSource = [[RKObjectMappingOperationDataSource new] autorelease];
mapper.mappingOperationDataSource = [RKObjectMappingOperationDataSource new];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"user.json"];
RKTestUser *user = [RKTestUser user];
BOOL success = [mapper mapFromObject:userInfo toObject:user atKeyPath:@"" usingMapping:mapping];
[mapper release];
assertThatBool(success, is(equalToBool(YES)));
assertThatInt([user.userID intValue], is(equalToInt(31337)));
assertThat(user.name, is(equalTo(@"Blake Watters")));
@@ -244,13 +243,12 @@
[mapping addPropertyMapping:nameMapping];
RKMapperOperation *mapper = [RKMapperOperation new];
mapper.mappingOperationDataSource = [[RKObjectMappingOperationDataSource new] autorelease];
mapper.mappingOperationDataSource = [RKObjectMappingOperationDataSource new];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"users.json"];
NSArray *users = [mapper mapCollection:userInfo atKeyPath:@"" usingMapping:mapping];
assertThatUnsignedInteger([users count], is(equalToInt(3)));
RKTestUser *blake = [users objectAtIndex:0];
assertThat(blake.name, is(equalTo(@"Blake Watters")));
[mapper release];
}
// TODO: This doesn't really test anything anymore...
@@ -503,7 +501,7 @@
assertThat(group.name, is(equalTo(@"restkit")));
NSSortDescriptor *sortByName = [[[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES] autorelease];
NSSortDescriptor *sortByName = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES];
NSArray *descriptors = [NSArray arrayWithObject:sortByName];;
NSArray *users = [group.users sortedArrayUsingDescriptors:descriptors];
RKTestUser *user = [users objectAtIndex:0];
@@ -704,9 +702,9 @@
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"user.json"];
RKMapperOperation *mapper = [[RKMapperOperation alloc] initWithObject:userInfo mappingsDictionary:mappingsDictionary];
RKTestUser *exampleUser = [[RKTestUser new] autorelease];
RKTestUser *exampleUser = [RKTestUser new];
id mockObject = [OCMockObject partialMockForObject:exampleUser];
[[[mockObject expect] andCall:@selector(fakeValidateValue:forKeyPath:error:) onObject:self] validateValue:[OCMArg anyPointer] forKeyPath:OCMOCK_ANY error:[OCMArg anyPointer]];
[[[mockObject expect] andCall:@selector(fakeValidateValue:forKeyPath:error:) onObject:self] validateValue:(id __autoreleasing *)[OCMArg anyPointer] forKeyPath:OCMOCK_ANY error:(NSError * __autoreleasing *)[OCMArg anyPointer]];
mapper.targetObject = mockObject;
[[mockDelegate expect] mapper:mapper didFailMappingOperation:OCMOCK_ANY forKeyPath:nil withError:OCMOCK_ANY];
mapper.delegate = mockDelegate;
@@ -734,7 +732,6 @@
[operation start];
assertThat(user.name, is(equalTo(@"Blake Watters")));
assertThatInt([user.userID intValue], is(equalToInt(123)));
[operation release];
}
- (void)testShouldConsiderADictionaryContainingOnlyNullValuesForKeysMappable
@@ -754,7 +751,6 @@
BOOL success = [operation performMapping:nil];
assertThatBool(success, is(equalToBool(YES)));
assertThat(user.name, is(nilValue()));
[operation release];
}
- (void)testShouldBeAbleToMapAUserToADictionary
@@ -777,7 +773,6 @@
assertThatBool(success, is(equalToBool(YES)));
assertThat([dictionary valueForKey:@"name"], is(equalTo(@"Blake Watters")));
assertThatInt([[dictionary valueForKey:@"id"] intValue], is(equalToInt(123)));
[operation release];
}
- (void)testShouldReturnNoWithoutErrorWhenGivenASourceObjectThatContainsNoMappableKeys
@@ -834,7 +829,7 @@
NSMutableDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:@"FAILURE", @"id", nil];
RKTestUser *user = [RKTestUser user];
id mockObject = [OCMockObject partialMockForObject:user];
[[[mockObject expect] andCall:@selector(fakeValidateValue:forKeyPath:error:) onObject:self] validateValue:[OCMArg anyPointer] forKeyPath:OCMOCK_ANY error:[OCMArg anyPointer]];
[[[mockObject expect] andCall:@selector(fakeValidateValue:forKeyPath:error:) onObject:self] validateValue:(id __autoreleasing *)[OCMArg anyPointer] forKeyPath:OCMOCK_ANY error:(NSError * __autoreleasing *)[OCMArg anyPointer]];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:mockObject mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
@@ -842,7 +837,6 @@
NSError *error = nil;
[operation performMapping:&error];
assertThat(error, isNot(nilValue()));
[operation release];
}
#pragma mark - Attribute Mapping
@@ -863,7 +857,7 @@
NSError *error = nil;
[operation performMapping:&error];
NSDateFormatter *dateFormatter = [[NSDateFormatter new] autorelease];
NSDateFormatter *dateFormatter = [NSDateFormatter new];
dateFormatter.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"UTC"];
[dateFormatter setDateFormat:@"MM/dd/yyyy"];
assertThat([dateFormatter stringFromDate:user.birthDate], is(equalTo(@"11/27/1982")));
@@ -1051,7 +1045,7 @@
- (void)testShouldMapANumberToADate
{
NSDateFormatter *dateFormatter = [[NSDateFormatter new] autorelease];
NSDateFormatter *dateFormatter = [NSDateFormatter new];
[dateFormatter setDateFormat:@"MM/dd/yyyy"];
NSDate *date = [dateFormatter dateFromString:@"11/27/1982"];
@@ -1138,7 +1132,7 @@
RKTestUser *user = [RKTestUser user];
user.name = @"Blake Watters";
id mockUser = [OCMockObject partialMockForObject:user];
[[mockUser reject] setName:OCMOCK_ANY];
[(RKTestUser *)[mockUser reject] setName:OCMOCK_ANY];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:user mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
operation.dataSource = dataSource;
@@ -1157,7 +1151,7 @@
RKTestUser *user = [RKTestUser user];
user.name = nil;
id mockUser = [OCMockObject partialMockForObject:user];
[[mockUser reject] setName:OCMOCK_ANY];
[(RKTestUser *)[mockUser reject] setName:OCMOCK_ANY];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:user mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
operation.dataSource = dataSource;
@@ -1176,7 +1170,7 @@
RKTestUser *user = [RKTestUser user];
user.name = @"Blake Watters";
id mockUser = [OCMockObject partialMockForObject:user];
[[mockUser expect] setName:nil];
[(RKTestUser *)[mockUser expect] setName:nil];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:user mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
operation.dataSource = dataSource;
@@ -1240,7 +1234,7 @@
RKTestUser *user = [RKTestUser user];
user.name = @"Blake Watters";
id mockUser = [OCMockObject partialMockForObject:user];
[[mockUser expect] setName:nil];
[(RKTestUser *)[mockUser expect] setName:nil];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:user mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
operation.dataSource = dataSource;
@@ -1263,7 +1257,7 @@
RKTestUser *user = [RKTestUser user];
user.name = @"Blake Watters";
id mockUser = [OCMockObject partialMockForObject:user];
[[mockUser reject] setName:nil];
[(RKTestUser *)[mockUser reject] setName:nil];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:user mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
operation.dataSource = dataSource;
@@ -1290,11 +1284,10 @@
[userMapping addPropertyMapping:hasOneMapping];
RKMapperOperation *mapper = [RKMapperOperation new];
mapper.mappingOperationDataSource = [[RKObjectMappingOperationDataSource new] autorelease];
mapper.mappingOperationDataSource = [RKObjectMappingOperationDataSource new];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"user.json"];
RKTestUser *user = [RKTestUser user];
BOOL success = [mapper mapFromObject:userInfo toObject:user atKeyPath:@"" usingMapping:userMapping];
[mapper release];
assertThatBool(success, is(equalToBool(YES)));
assertThat(user.name, is(equalTo(@"Blake Watters")));
assertThat(user.address, isNot(nilValue()));
@@ -1313,11 +1306,10 @@
[userMapping addPropertyMapping:hasOneMapping];
RKMapperOperation *mapper = [RKMapperOperation new];
mapper.mappingOperationDataSource = [[RKObjectMappingOperationDataSource new] autorelease];
mapper.mappingOperationDataSource = [RKObjectMappingOperationDataSource new];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"user.json"];
RKTestUser *user = [RKTestUser user];
BOOL success = [mapper mapFromObject:userInfo toObject:user atKeyPath:@"" usingMapping:userMapping];
[mapper release];
assertThatBool(success, is(equalToBool(YES)));
assertThat(user.name, is(equalTo(@"Blake Watters")));
assertThat(user.friends, isNot(nilValue()));
@@ -1337,11 +1329,10 @@
[userMapping addPropertyMapping:hasOneMapping];
RKMapperOperation *mapper = [RKMapperOperation new];
mapper.mappingOperationDataSource = [[RKObjectMappingOperationDataSource new] autorelease];
mapper.mappingOperationDataSource = [RKObjectMappingOperationDataSource new];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"user.json"];
RKTestUser *user = [RKTestUser user];
BOOL success = [mapper mapFromObject:userInfo toObject:user atKeyPath:@"" usingMapping:userMapping];
[mapper release];
assertThatBool(success, is(equalToBool(YES)));
assertThat(user.name, is(equalTo(@"Blake Watters")));
assertThat(user.friendsOrderedSet, isNot(nilValue()));
@@ -1358,11 +1349,10 @@
[userMapping addPropertyMapping:hasManyMapping];
RKMapperOperation *mapper = [RKMapperOperation new];
mapper.mappingOperationDataSource = [[RKObjectMappingOperationDataSource new] autorelease];
mapper.mappingOperationDataSource = [RKObjectMappingOperationDataSource new];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"user.json"];
RKTestUser *user = [RKTestUser user];
BOOL success = [mapper mapFromObject:userInfo toObject:user atKeyPath:@"" usingMapping:userMapping];
[mapper release];
assertThatBool(success, is(equalToBool(YES)));
assertThat(user.name, is(equalTo(@"Blake Watters")));
assertThat(user.friends, isNot(nilValue()));
@@ -1381,11 +1371,10 @@
[userMapping addPropertyMapping:hasManyMapping];
RKMapperOperation *mapper = [RKMapperOperation new];
mapper.mappingOperationDataSource = [[RKObjectMappingOperationDataSource new] autorelease];
mapper.mappingOperationDataSource = [RKObjectMappingOperationDataSource new];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"user.json"];
RKTestUser *user = [RKTestUser user];
BOOL success = [mapper mapFromObject:userInfo toObject:user atKeyPath:@"" usingMapping:userMapping];
[mapper release];
assertThatBool(success, is(equalToBool(YES)));
assertThat(user.name, is(equalTo(@"Blake Watters")));
assertThat(user.friendsSet, isNot(nilValue()));
@@ -1405,11 +1394,10 @@
[userMapping addPropertyMapping:hasManyMapping];
RKMapperOperation *mapper = [RKMapperOperation new];
mapper.mappingOperationDataSource = [[RKObjectMappingOperationDataSource new] autorelease];
mapper.mappingOperationDataSource = [RKObjectMappingOperationDataSource new];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"user.json"];
RKTestUser *user = [RKTestUser user];
BOOL success = [mapper mapFromObject:userInfo toObject:user atKeyPath:@"" usingMapping:userMapping];
[mapper release];
assertThatBool(success, is(equalToBool(YES)));
assertThat(user.name, is(equalTo(@"Blake Watters")));
assertThat(user.friendsOrderedSet, isNot(nilValue()));
@@ -1439,10 +1427,9 @@
[userMapping addPropertyMapping:hasOneMapping];
RKMapperOperation *mapper = [RKMapperOperation new];
mapper.mappingOperationDataSource = [[RKObjectMappingOperationDataSource new] autorelease];
mapper.mappingOperationDataSource = [RKObjectMappingOperationDataSource new];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"user.json"];
[mapper mapFromObject:userInfo toObject:user atKeyPath:@"" usingMapping:userMapping];
[mapper release];
}
- (void)testSkippingOfIdenticalObjectsInformsDelegate
@@ -1487,7 +1474,7 @@
[userMapping addPropertyMapping:hasManyMapping];
RKMapperOperation *mapper = [RKMapperOperation new];
mapper.mappingOperationDataSource = [[RKObjectMappingOperationDataSource new] autorelease];
mapper.mappingOperationDataSource = [RKObjectMappingOperationDataSource new];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"user.json"];
RKTestUser *user = [RKTestUser user];
@@ -1503,7 +1490,6 @@
id mockUser = [OCMockObject partialMockForObject:user];
[[mockUser reject] setFriends:OCMOCK_ANY];
[mapper mapFromObject:userInfo toObject:mockUser atKeyPath:@"" usingMapping:userMapping];
[mapper release];
[mockUser verify];
}
@@ -1760,7 +1746,7 @@
[mappingsDictionary setObject:dynamicMapping forKey:@""];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"boy.json"];
Boy *blake = [[Boy new] autorelease];
Boy *blake = [Boy new];
RKMapperOperation *mapper = [[RKMapperOperation alloc] initWithObject:userInfo mappingsDictionary:mappingsDictionary];
mapper.targetObject = blake;
[mapper start];
@@ -1782,7 +1768,7 @@
[mappingsDictionary setObject:dynamicMapping forKey:@""];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"boy.json"];
Boy *blake = [[Boy new] autorelease];
Boy *blake = [Boy new];
RKMapperOperation *mapper = [[RKMapperOperation alloc] initWithObject:userInfo mappingsDictionary:mappingsDictionary];
mapper.targetObject = blake;
[mapper start];
@@ -1808,7 +1794,7 @@
[mappingsDictionary setObject:dynamicMapping forKey:@""];
id userInfo = [RKTestFixture parsedObjectWithContentsOfFixture:@"girl.json"];
Boy *blake = [[Boy new] autorelease];
Boy *blake = [Boy new];
RKMapperOperation *mapper = [[RKMapperOperation alloc] initWithObject:userInfo mappingsDictionary:mappingsDictionary];
mapper.targetObject = blake;
[mapper start];
@@ -1851,7 +1837,7 @@
- (void)testShouldAllowNewlyAddedDateFormatterToRunFirst
{
[RKObjectMapping setDefaultDateFormatters:nil];
NSDateFormatter *newDateFormatter = [[NSDateFormatter new] autorelease];
NSDateFormatter *newDateFormatter = [NSDateFormatter new];
[newDateFormatter setDateFormat:@"dd/MM/yyyy"];
[RKObjectMapping addDefaultDateFormatter:newDateFormatter];
@@ -1867,7 +1853,7 @@
operation.dataSource = dataSource;
[operation performMapping:&error];
NSDateFormatter *dateFormatter = [[NSDateFormatter new] autorelease];
NSDateFormatter *dateFormatter = [NSDateFormatter new];
dateFormatter.timeZone = [NSTimeZone timeZoneWithAbbreviation:@"UTC"];
[dateFormatter setDateFormat:@"MM/dd/yyyy"];
@@ -1902,7 +1888,6 @@
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:mutableDictionary destinationObject:user mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
operation.dataSource = dataSource;
[mutableDictionary release];
NSError *error = nil;
[operation performMapping:&error];

View File

@@ -32,12 +32,12 @@
NSArray *_array;
}
@property (nonatomic, retain) NSURL *url;
@property (nonatomic, retain) NSString *boolString;
@property (nonatomic, retain) NSNumber *boolNumber;
@property (nonatomic, retain) NSDate *date;
@property (nonatomic, retain) NSOrderedSet *orderedSet;
@property (nonatomic, retain) NSArray *array;
@property (nonatomic, strong) NSURL *url;
@property (nonatomic, strong) NSString *boolString;
@property (nonatomic, strong) NSNumber *boolNumber;
@property (nonatomic, strong) NSDate *date;
@property (nonatomic, strong) NSOrderedSet *orderedSet;
@property (nonatomic, strong) NSArray *array;
@end
@@ -82,7 +82,7 @@
NSURL *url1 = [NSURL URLWithString:@"http://www.restkit.org"];
NSURL *url2 = [NSURL URLWithString:@"http://www.restkit.org"];
assertThatBool(url1 == url2, is(equalToBool(NO)));
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
[object setUrl:url1];
NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:url2, @"url", nil];
@@ -93,14 +93,13 @@
BOOL success = (operation.error == nil);
assertThatBool(success, is(equalToBool(YES)));
assertThatBool(object.url == url1, is(equalToBool(YES)));
[operation release];
}
- (void)testShouldSuccessfullyMapBoolsToStrings
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addAttributeMappingsFromArray:@[@"boolString"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
NSData *data = [@"{\"boolString\":true}" dataUsingEncoding:NSUTF8StringEncoding];
id deserializedObject = [RKMIMETypeSerialization objectFromData:data MIMEType:RKMIMETypeJSON error:nil];
@@ -112,14 +111,13 @@
BOOL success = (operation.error == nil);
assertThatBool(success, is(equalToBool(YES)));
assertThat(object.boolString, is(equalTo(@"true")));
[operation release];
}
- (void)testShouldSuccessfullyMapTrueBoolsToNSNumbers
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addAttributeMappingsFromArray:@[@"boolNumber"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
NSData *data = [@"{\"boolNumber\":true}" dataUsingEncoding:NSUTF8StringEncoding];
id deserializedObject = [RKMIMETypeSerialization objectFromData:data MIMEType:RKMIMETypeJSON error:nil];
@@ -131,14 +129,13 @@
BOOL success = (operation.error == nil);
assertThatBool(success, is(equalToBool(YES)));
assertThatInt([object.boolNumber intValue], is(equalToInt(1)));
[operation release];
}
- (void)testShouldSuccessfullyMapFalseBoolsToNSNumbers
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addAttributeMappingsFromArray:@[@"boolNumber"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
NSData *data = [@"{\"boolNumber\":false}" dataUsingEncoding:NSUTF8StringEncoding];
id deserializedObject = [RKMIMETypeSerialization objectFromData:data MIMEType:RKMIMETypeJSON error:nil];
@@ -150,14 +147,13 @@
BOOL success = (operation.error == nil);
assertThatBool(success, is(equalToBool(YES)));
assertThatInt([object.boolNumber intValue], is(equalToInt(0)));
[operation release];
}
- (void)testShouldSuccessfullyMapNumbersToStrings
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:@"number" toKeyPath:@"boolString"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
NSData *data = [@"{\"number\":123}" dataUsingEncoding:NSUTF8StringEncoding];
id deserializedObject = [RKMIMETypeSerialization objectFromData:data MIMEType:RKMIMETypeJSON error:nil];
@@ -169,14 +165,13 @@
BOOL success = (operation.error == nil);
assertThatBool(success, is(equalToBool(YES)));
assertThat(object.boolString, is(equalTo(@"123")));
[operation release];
}
- (void)testShouldSuccessfullyMapArraysToOrderedSets
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:@"numbers" toKeyPath:@"orderedSet"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
NSData *data = [@"{\"numbers\":[1, 2, 3]}" dataUsingEncoding:NSUTF8StringEncoding];
id deserializedObject = [RKMIMETypeSerialization objectFromData:data MIMEType:RKMIMETypeJSON error:nil];
@@ -188,16 +183,15 @@
assertThatBool(success, is(equalToBool(YES)));
NSOrderedSet *expectedSet = [NSOrderedSet orderedSetWithObjects:[NSNumber numberWithInt:1], [NSNumber numberWithInt:2], [NSNumber numberWithInt:3], nil];
assertThat(object.orderedSet, is(equalTo(expectedSet)));
[operation release];
}
- (void)testShouldSuccessfullyMapOrderedSetsToArrays
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:@"orderedSet" toKeyPath:@"array"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
TestMappable *data = [[[TestMappable alloc] init] autorelease];
TestMappable *data = [[TestMappable alloc] init];
data.orderedSet = [NSOrderedSet orderedSetWithObjects:[NSNumber numberWithInt:1], [NSNumber numberWithInt:2], [NSNumber numberWithInt:3], nil];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:data destinationObject:object mapping:mapping];
@@ -207,14 +201,13 @@
assertThatBool(success, is(equalToBool(YES)));
NSArray *expectedArray = [NSArray arrayWithObjects:[NSNumber numberWithInt:1], [NSNumber numberWithInt:2], [NSNumber numberWithInt:3], nil];
assertThat(object.array, is(equalTo(expectedArray)));
[operation release];
}
- (void)testShouldFailTheMappingOperationIfKeyValueValidationSetsAnError
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addAttributeMappingsFromArray:@[@"boolString"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
NSDictionary *dictionary = [NSDictionary dictionaryWithObject:@"FAIL" forKey:@"boolString"];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:object mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
@@ -223,14 +216,13 @@
BOOL success = [operation performMapping:&error];
assertThatBool(success, is(equalToBool(NO)));
assertThat(error, isNot(nilValue()));
[operation release];
}
- (void)testShouldNotSetTheAttributeIfKeyValueValidationReturnsNo
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addAttributeMappingsFromArray:@[@"boolString"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
object.boolString = @"should not change";
NSDictionary *dictionary = [NSDictionary dictionaryWithObject:@"REJECT" forKey:@"boolString"];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:object mapping:mapping];
@@ -240,14 +232,13 @@
BOOL success = [operation performMapping:&error];
assertThatBool(success, is(equalToBool(YES)));
assertThat(object.boolString, is(equalTo(@"should not change")));
[operation release];
}
- (void)testModifyingValueWithinKeyValueValidationIsRespected
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addAttributeMappingsFromArray:@[@"boolString"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
NSDictionary *dictionary = [NSDictionary dictionaryWithObject:@"MODIFY" forKey:@"boolString"];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:object mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
@@ -256,7 +247,6 @@
BOOL success = [operation performMapping:&error];
assertThatBool(success, is(equalToBool(YES)));
assertThat(object.boolString, is(equalTo(@"modified value")));
[operation release];
}
#pragma mark - TimeZone Handling
@@ -265,7 +255,7 @@
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addAttributeMappingsFromArray:@[@"date"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
NSDictionary *dictionary = [NSDictionary dictionaryWithObject:@"2011-07-07T04:35:28Z" forKey:@"date"];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:object mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
@@ -275,14 +265,13 @@
assertThatBool(success, is(equalToBool(YES)));
assertThat(object.date, isNot(nilValue()));
assertThat([object.date description], is(equalTo(@"2011-07-07 04:35:28 +0000")));
[operation release];
}
- (void)testShouldMapAUnixTimestampStringAppropriately
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addAttributeMappingsFromArray:@[@"date"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
NSDictionary *dictionary = [NSDictionary dictionaryWithObject:@"457574400" forKey:@"date"];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:object mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
@@ -292,14 +281,13 @@
assertThatBool(success, is(equalToBool(YES)));
assertThat(object.date, isNot(nilValue()));
assertThat([object.date description], is(equalTo(@"1984-07-02 00:00:00 +0000")));
[operation release];
}
- (void)testShouldMapASimpleDateStringAppropriately
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addAttributeMappingsFromArray:@[@"date"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
NSDictionary *dictionary = [NSDictionary dictionaryWithObject:@"08/09/2011" forKey:@"date"];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:object mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
@@ -309,14 +297,13 @@
assertThatBool(success, is(equalToBool(YES)));
assertThat(object.date, isNot(nilValue()));
assertThat([object.date description], is(equalTo(@"2011-08-09 00:00:00 +0000")));
[operation release];
}
- (void)testShouldMapAISODateStringAppropriately
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addAttributeMappingsFromArray:@[@"date"]];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
NSDictionary *dictionary = [NSDictionary dictionaryWithObject:@"2011-08-09T00:00Z" forKey:@"date"];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:object mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
@@ -326,19 +313,18 @@
assertThatBool(success, is(equalToBool(YES)));
assertThat(object.date, isNot(nilValue()));
assertThat([object.date description], is(equalTo(@"2011-08-09 00:00:00 +0000")));
[operation release];
}
- (void)testShouldMapAStringIntoTheLocalTimeZone
{
NSTimeZone *EDTTimeZone = [NSTimeZone timeZoneWithAbbreviation:@"EDT"];
NSDateFormatter *dateFormatter = [[NSDateFormatter new] autorelease];
NSDateFormatter *dateFormatter = [NSDateFormatter new];
dateFormatter.dateFormat = @"MM-dd-yyyy";
dateFormatter.timeZone = EDTTimeZone;
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addAttributeMappingsFromArray:@[@"date"]];
mapping.dateFormatters = [NSArray arrayWithObject:dateFormatter];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
NSDictionary *dictionary = [NSDictionary dictionaryWithObject:@"11-27-1982" forKey:@"date"];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:dictionary destinationObject:object mapping:mapping];
RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new];
@@ -349,17 +335,16 @@
assertThat(object.date, isNot(nilValue()));
// Since there is no time date, our description will be midnight + UTC offset (5 hours)
assertThat([object.date description], is(equalTo(@"1982-11-27 05:00:00 +0000")));
[operation release];
}
- (void)testShouldMapADateToAStringUsingThePreferredDateFormatter
{
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[TestMappable class]];
[mapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:@"date" toKeyPath:@"boolString"]];
NSDateFormatter *dateFormatter = [[NSDateFormatter new] autorelease];
NSDateFormatter *dateFormatter = [NSDateFormatter new];
dateFormatter.dateFormat = @"MM-dd-yyyy";
dateFormatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
object.date = [dateFormatter dateFromString:@"11-27-1982"];
mapping.preferredDateFormatter = dateFormatter;
TestMappable *newObject = [TestMappable new];
@@ -377,7 +362,7 @@
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[NSMutableDictionary class]];
[mapping addAttributeMappingsFromArray:@[@"invalid", @"boolString"]];
mapping.ignoreUnknownKeyPaths = NO;
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
object.boolString = @"test";
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:object destinationObject:dictionary mapping:mapping];
@@ -394,7 +379,7 @@
}
@finally {
assertThat(exception, isNot(nilValue()));
[operation release];
operation = nil;
}
}
@@ -403,7 +388,7 @@
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[NSMutableDictionary class]];
[mapping addAttributeMappingsFromArray:@[@"invalid", @"boolString"]];
mapping.ignoreUnknownKeyPaths = YES;
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
object.boolString = @"test";
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:object destinationObject:dictionary mapping:mapping];
@@ -421,7 +406,7 @@
@finally {
assertThat(exception, is(nilValue()));
assertThatBool(success, is(equalToBool(YES)));
[operation release];
operation = nil;
}
}
@@ -431,7 +416,7 @@
[mapping addAttributeMappingsFromArray:@[@"boolString"]];
[mapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@"invalid" toKeyPath:@"invalid" withMapping:[RKObjectMapping mappingForClass:[TestMappable class]]]];
mapping.ignoreUnknownKeyPaths = YES;
TestMappable *object = [[[TestMappable alloc] init] autorelease];
TestMappable *object = [[TestMappable alloc] init];
object.boolString = @"test";
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:object destinationObject:dictionary mapping:mapping];
@@ -449,7 +434,7 @@
@finally {
assertThat(exception, is(nilValue()));
assertThatBool(success, is(equalToBool(YES)));
[operation release];
operation = nil;
}
}
@@ -463,7 +448,7 @@
RKObjectMapping *relationshipMapping = [RKObjectMapping mappingForClass:[RKMappableAssociation class]];
[relationshipMapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:@"title" toKeyPath:@"testString"]];
[objectMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@"mediaGroups.contents" toKeyPath:@"hasMany" withMapping:relationshipMapping]];;
RKMappableObject *targetObject = [[RKMappableObject new] autorelease];
RKMappableObject *targetObject = [RKMappableObject new];
RKLogToComponentWithLevelWhileExecutingBlock(lcl_cRestKitObjectMapping, RKLogLevelDebug, ^ {
RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:data
destinationObject:targetObject mapping:objectMapping];

View File

@@ -76,7 +76,7 @@
{
NSDictionary *object = [NSDictionary dictionaryWithObjectsAndKeys:@"value1", @"key1", [NSDate dateWithTimeIntervalSince1970:0], @"date", nil];
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[NSDictionary class]];
NSDateFormatter *dateFormatter = [[NSDateFormatter new] autorelease];
NSDateFormatter *dateFormatter = [NSDateFormatter new];
dateFormatter.dateFormat = @"MM/dd/yyyy";
dateFormatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
mapping.preferredDateFormatter = dateFormatter;
@@ -192,9 +192,9 @@
- (void)testShouldSerializeNestedObjectsContainingDatesToJSON
{
RKMappableObject *object = [[RKMappableObject new] autorelease];
RKMappableObject *object = [RKMappableObject new];
object.stringTest = @"The string";
RKMappableAssociation *association = [[RKMappableAssociation new] autorelease];
RKMappableAssociation *association = [RKMappableAssociation new];
association.date = [NSDate dateWithTimeIntervalSince1970:0];
object.hasOne = association;
@@ -237,9 +237,9 @@
- (void)testShouldSerializeToManyRelationships
{
RKMappableObject *object = [[RKMappableObject new] autorelease];
RKMappableObject *object = [RKMappableObject new];
object.stringTest = @"The string";
RKMappableAssociation *association = [[RKMappableAssociation new] autorelease];
RKMappableAssociation *association = [RKMappableAssociation new];
association.date = [NSDate dateWithTimeIntervalSince1970:0];
object.hasMany = [NSSet setWithObject:association];

View File

@@ -181,9 +181,6 @@
is(equalTo([NSSet setWithArray:@[ @"this", @"my", @"name" ]])));
[indexer stopObservingManagedObjectContext:managedObjectContext];
[indexer release];
[managedObjectContext release];
[persistentStoreCoordinator release];
}
- (void)testIndexingChangesInManagedObjectContextWithoutSave
@@ -210,9 +207,6 @@
assertThat([searchWords valueForKey:@"word"],
is(equalTo([NSSet setWithArray:@[ @"this", @"my", @"name" ]])));
[indexer release];
[managedObjectContext release];
[persistentStoreCoordinator release];
}
@end

View File

@@ -31,7 +31,7 @@
- (void)testShouldInterpolateObjects
{
RKObjectMapperTestModel *person = [[[RKObjectMapperTestModel alloc] init] autorelease];
RKObjectMapperTestModel *person = [[RKObjectMapperTestModel alloc] init];
person.name = @"CuddleGuts";
person.age = [NSNumber numberWithInt:6];
NSString *interpolatedPath = RKPathFromPatternWithObject(@"/people/:name/:age", person);

View File

@@ -24,18 +24,18 @@
@interface RKCat : NSManagedObject
@property (nonatomic, retain) NSNumber *age;
@property (nonatomic, retain) NSNumber *birthYear;
@property (nonatomic, retain) NSString *color;
@property (nonatomic, retain) NSDate *createdAt;
@property (nonatomic, retain) NSNumber *humanId;
@property (nonatomic, retain) NSString *name;
@property (nonatomic, retain) NSString *nickName;
@property (nonatomic, retain) NSNumber *railsID;
@property (nonatomic, retain) NSString *sex;
@property (nonatomic, retain) NSDate *updatedAt;
@property (nonatomic, strong) NSNumber *age;
@property (nonatomic, strong) NSNumber *birthYear;
@property (nonatomic, strong) NSString *color;
@property (nonatomic, strong) NSDate *createdAt;
@property (nonatomic, strong) NSNumber *humanId;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *nickName;
@property (nonatomic, strong) NSNumber *railsID;
@property (nonatomic, strong) NSString *sex;
@property (nonatomic, strong) NSDate *updatedAt;
@property (nonatomic, retain) RKHuman *human;
@property (nonatomic, retain) NSSet *favoriteOfHumans;
@property (nonatomic, strong) RKHuman *human;
@property (nonatomic, strong) NSSet *favoriteOfHumans;
@end

View File

@@ -27,10 +27,10 @@
@interface RKChild : RKHuman {
}
@property (nonatomic, retain) NSSet *parents;
@property (nonatomic, retain) NSNumber *motherID;
@property (nonatomic, retain) NSNumber *fatherID;
@property (nonatomic, retain) RKParent *father;
@property (nonatomic, retain) RKParent *mother;
@property (nonatomic, strong) NSSet *parents;
@property (nonatomic, strong) NSNumber *motherID;
@property (nonatomic, strong) NSNumber *fatherID;
@property (nonatomic, strong) RKParent *father;
@property (nonatomic, strong) RKParent *mother;
@end

View File

@@ -21,8 +21,8 @@
#import <Foundation/Foundation.h>
@interface Person : NSObject
@property (nonatomic, retain) NSString *name;
@property (nonatomic, retain) NSArray *friends;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSArray *friends;
@end
@interface Boy : Person

View File

@@ -23,9 +23,9 @@
@interface RKEvent : NSManagedObject
@property (nonatomic, retain) NSString *eventID;
@property (nonatomic, retain) NSString *eventType;
@property (nonatomic, retain) NSString *location;
@property (nonatomic, retain) NSString *summary;
@property (nonatomic, strong) NSString *eventID;
@property (nonatomic, strong) NSString *eventType;
@property (nonatomic, strong) NSString *location;
@property (nonatomic, strong) NSString *summary;
@end

View File

@@ -25,13 +25,13 @@
}
@property (nonatomic, retain) NSString *city;
@property (nonatomic, retain) NSDate *createdAt;
@property (nonatomic, retain) NSNumber *ownerId;
@property (nonatomic, retain) NSNumber *railsID;
@property (nonatomic, retain) NSString *state;
@property (nonatomic, retain) NSString *street;
@property (nonatomic, retain) NSDate *updatedAt;
@property (nonatomic, retain) NSString *zip;
@property (nonatomic, strong) NSString *city;
@property (nonatomic, strong) NSDate *createdAt;
@property (nonatomic, strong) NSNumber *ownerId;
@property (nonatomic, strong) NSNumber *railsID;
@property (nonatomic, strong) NSString *state;
@property (nonatomic, strong) NSString *street;
@property (nonatomic, strong) NSDate *updatedAt;
@property (nonatomic, strong) NSString *zip;
@end

View File

@@ -24,22 +24,22 @@
@interface RKHuman : NSManagedObject
@property (nonatomic, retain) NSNumber *railsID;
@property (nonatomic, retain) NSString *name;
@property (nonatomic, retain) NSString *nickName;
@property (nonatomic, retain) NSDate *birthday;
@property (nonatomic, retain) NSString *sex;
@property (nonatomic, retain) NSNumber *age;
@property (nonatomic, retain) NSDate *createdAt;
@property (nonatomic, retain) NSDate *updatedAt;
@property (nonatomic, retain) NSArray *favoriteColors;
@property (nonatomic, strong) NSNumber *railsID;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *nickName;
@property (nonatomic, strong) NSDate *birthday;
@property (nonatomic, strong) NSString *sex;
@property (nonatomic, strong) NSNumber *age;
@property (nonatomic, strong) NSDate *createdAt;
@property (nonatomic, strong) NSDate *updatedAt;
@property (nonatomic, strong) NSArray *favoriteColors;
@property (nonatomic, retain) NSSet *cats;
@property (nonatomic, retain) NSNumber *favoriteCatID;
@property (nonatomic, retain) RKCat *favoriteCat;
@property (nonatomic, strong) NSSet *cats;
@property (nonatomic, strong) NSNumber *favoriteCatID;
@property (nonatomic, strong) RKCat *favoriteCat;
@property (nonatomic, retain) NSArray *catIDs;
@property (nonatomic, retain) NSOrderedSet *catsInOrderByAge;
@property (nonatomic, strong) NSArray *catIDs;
@property (nonatomic, strong) NSOrderedSet *catsInOrderByAge;
@end

View File

@@ -25,7 +25,7 @@
NSDate *_date;
}
@property (nonatomic, retain) NSString *testString;
@property (nonatomic, retain) NSDate *date;
@property (nonatomic, strong) NSString *testString;
@property (nonatomic, strong) NSDate *date;
@end

View File

@@ -25,11 +25,5 @@
@synthesize testString = _testString;
@synthesize date = _date;
- (void)dealloc
{
[_testString release];
[_date release];
[super dealloc];
}
@end

View File

@@ -30,11 +30,11 @@
NSSet *_hasMany;
}
@property (nonatomic, retain) NSDate *dateTest;
@property (nonatomic, retain) NSNumber *numberTest;
@property (nonatomic, retain) NSString *stringTest;
@property (nonatomic, retain) NSURL *urlTest;
@property (nonatomic, retain) RKMappableAssociation *hasOne;
@property (nonatomic, retain) NSSet *hasMany;
@property (nonatomic, strong) NSDate *dateTest;
@property (nonatomic, strong) NSNumber *numberTest;
@property (nonatomic, strong) NSString *stringTest;
@property (nonatomic, strong) NSURL *urlTest;
@property (nonatomic, strong) RKMappableAssociation *hasOne;
@property (nonatomic, strong) NSSet *hasMany;
@end

View File

@@ -26,8 +26,8 @@
NSString *_photoURL;
}
@property (nonatomic, retain) NSNumber *ID;
@property (nonatomic, retain) NSDate *endsAt;
@property (nonatomic, retain) NSString *photoURL;
@property (nonatomic, strong) NSNumber *ID;
@property (nonatomic, strong) NSDate *endsAt;
@property (nonatomic, strong) NSString *photoURL;
@end

View File

@@ -27,8 +27,8 @@
NSDate *_createdAt;
}
@property (nonatomic, retain) NSString *name;
@property (nonatomic, retain) NSNumber *age;
@property (nonatomic, retain) NSDate *createdAt;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSNumber *age;
@property (nonatomic, strong) NSDate *createdAt;
@end

View File

@@ -27,8 +27,8 @@
@interface RKParent : RKHuman {
}
@property (nonatomic, retain) NSSet *fatheredChildren;
@property (nonatomic, retain) NSSet *children;
@property (nonatomic, retain) NSNumber *parentID;
@property (nonatomic, strong) NSSet *fatheredChildren;
@property (nonatomic, strong) NSSet *children;
@property (nonatomic, strong) NSNumber *parentID;
@end

View File

@@ -26,10 +26,10 @@
@interface RKResident : NSManagedObject {
}
@property (nonatomic, retain) NSString *residableType;
@property (nonatomic, retain) NSNumber *railsID;
@property (nonatomic, retain) NSNumber *residableId;
@property (nonatomic, retain) NSNumber *houseId;
@property (nonatomic, retain) RKHouse *house;
@property (nonatomic, strong) NSString *residableType;
@property (nonatomic, strong) NSNumber *railsID;
@property (nonatomic, strong) NSNumber *residableId;
@property (nonatomic, strong) NSNumber *houseId;
@property (nonatomic, strong) RKHouse *house;
@end

View File

@@ -23,7 +23,7 @@
@interface RKSearchable : NSManagedObject
@property (nonatomic, retain) NSString *title;
@property (nonatomic, retain) NSString *body;
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *body;
@end

View File

@@ -15,10 +15,10 @@
NSString *_country;
}
@property (nonatomic, retain) NSNumber *addressID;
@property (nonatomic, retain) NSString *city;
@property (nonatomic, retain) NSString *state;
@property (nonatomic, retain) NSString *country;
@property (nonatomic, strong) NSNumber *addressID;
@property (nonatomic, strong) NSString *city;
@property (nonatomic, strong) NSString *state;
@property (nonatomic, strong) NSString *country;
+ (RKTestAddress *)address;

View File

@@ -17,7 +17,7 @@
+ (RKTestAddress *)address
{
return [[self new] autorelease];
return [self new];
}
// isEqual: is consulted by the mapping operation

View File

@@ -27,22 +27,22 @@
NSArray *_friends;
}
@property (nonatomic, retain) NSNumber *userID;
@property (nonatomic, retain) NSString *name;
@property (nonatomic, retain) NSDate *birthDate;
@property (nonatomic, retain) NSDate *favoriteDate;
@property (nonatomic, retain) NSArray *favoriteColors;
@property (nonatomic, retain) NSDictionary *addressDictionary;
@property (nonatomic, retain) NSURL *website;
@property (nonatomic, retain) NSNumber *isDeveloper;
@property (nonatomic, retain) NSNumber *luckyNumber;
@property (nonatomic, retain) NSDecimalNumber *weight;
@property (nonatomic, retain) NSArray *interests;
@property (nonatomic, retain) NSString *country;
@property (nonatomic, retain) RKTestAddress *address;
@property (nonatomic, retain) NSArray *friends;
@property (nonatomic, retain) NSSet *friendsSet;
@property (nonatomic, retain) NSOrderedSet *friendsOrderedSet;
@property (nonatomic, strong) NSNumber *userID;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSDate *birthDate;
@property (nonatomic, strong) NSDate *favoriteDate;
@property (nonatomic, strong) NSArray *favoriteColors;
@property (nonatomic, strong) NSDictionary *addressDictionary;
@property (nonatomic, strong) NSURL *website;
@property (nonatomic, strong) NSNumber *isDeveloper;
@property (nonatomic, strong) NSNumber *luckyNumber;
@property (nonatomic, strong) NSDecimalNumber *weight;
@property (nonatomic, strong) NSArray *interests;
@property (nonatomic, strong) NSString *country;
@property (nonatomic, strong) RKTestAddress *address;
@property (nonatomic, strong) NSArray *friends;
@property (nonatomic, strong) NSSet *friendsSet;
@property (nonatomic, strong) NSOrderedSet *friendsOrderedSet;
+ (RKTestUser *)user;

View File

@@ -30,7 +30,7 @@
+ (RKTestUser *)user
{
return [[self new] autorelease];
return [self new];
}
// isEqual: is consulted by the mapping operation