updated RKResponseDescriptor and migrated tests to SenTestCases #1738

Merged
merged 3 commits into from Jan 6, 2014

Projects

None yet

3 participants

@Kurry
Member
Kurry commented Jan 5, 2014

@blakewatters @segiddins I think this is good to go. I just stared at it for an hour, and need a fresh set of eyes. Let me know if everything looks good.

@segiddins segiddins and 1 other commented on an outdated diff Jan 5, 2014
Code/Network/Core/RKResponseDescriptor.m
@@ -91,7 +91,7 @@ - (id)initWithMethods:(RKHTTPMethodOptions)methods pathTemplateWithString:(NSStr
self = [super init];
if (self) {
self.methods = methods;
- self.pathTemplate = nil; // [RKPathTemplate pathTemplateWithString:pathTemplateString];
+ self.pathTemplate = pathTemplateString == nil ? nil : [RKPathTemplate pathTemplateWithString:pathTemplateString];
@segiddins
segiddins Jan 5, 2014 The RestKit Project member

Wrap ternary in parens

@Kurry
Kurry Jan 5, 2014 The RestKit Project member

@segiddins Thanks!

@segiddins
Member

@blakewatters should we move to XCTest or no?

@Kurry
Member
Kurry commented Jan 5, 2014

All of my tests are passing, we need to get this thing working in Travis.

2014-01-05 13:19:34.732 otest[56417:303] I restkit:RKLog.m:33 RestKit logging initialized...
2014-01-05 13:19:34.787 otest[56417:303] Unknown Device Type. Using UIUserInterfaceIdiomPhone based on screen size
2014-01-05 13:19:34.900 otest[56417:303] CLTilesManagerClient: initialize, sSharedTilesManagerClient
2014-01-05 13:19:34.901 otest[56417:303] CLTilesManagerClient: init
2014-01-05 13:19:34.901 otest[56417:303] CLTilesManagerClient: reconnecting, 0x2a33220
Test Suite 'Multiple Selected Tests' started at 2014-01-05 18:19:34 +0000
Test Suite '/Users/ktran/Library/Developer/Xcode/DerivedData/RestKit-fijedlnqdbydrahgslkjxqlybywa/Build/Products/Debug-iphonesimulator/RestKitTests.octest(Tests)' started at 2014-01-05 18:19:34 +0000
Test Suite 'AFHTTPRequestOperationIntegrationTests' started at 2014-01-05 18:19:34 +0000
Test Suite 'AFHTTPRequestOperationIntegrationTests' finished at 2014-01-05 18:19:34 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'NSManagedObjectContext_RKAdditionsTest' started at 2014-01-05 18:19:34 +0000
Test Suite 'NSManagedObjectContext_RKAdditionsTest' finished at 2014-01-05 18:19:34 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'NSStringRestKitTest' started at 2014-01-05 18:19:34 +0000
Test Suite 'NSStringRestKitTest' finished at 2014-01-05 18:19:34 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKAttributeMappingTest' started at 2014-01-05 18:19:34 +0000
Test Suite 'RKAttributeMappingTest' finished at 2014-01-05 18:19:34 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKConnectionDescriptionTest' started at 2014-01-05 18:19:34 +0000
Test Suite 'RKConnectionDescriptionTest' finished at 2014-01-05 18:19:34 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKDictionaryUtilitiesTest' started at 2014-01-05 18:19:34 +0000
Test Suite 'RKDictionaryUtilitiesTest' finished at 2014-01-05 18:19:34 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKDynamicMappingTest' started at 2014-01-05 18:19:34 +0000
Test Suite 'RKDynamicMappingTest' finished at 2014-01-05 18:19:34 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKEntityByAttributeCacheTest' started at 2014-01-05 18:19:34 +0000
Test Case '-[RKEntityByAttributeCacheTest testCacheIsFlushedOnMemoryWarning]' started.
Test Case '-[RKEntityByAttributeCacheTest testCacheIsFlushedOnMemoryWarning]' passed (0.065 seconds).
Test Suite 'RKEntityByAttributeCacheTest' finished at 2014-01-05 18:19:35 +0000.
Executed 1 test, with 0 failures (0 unexpected) in 0.065 (0.066) seconds
Test Suite 'RKEntityCacheTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKEntityCacheTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKEntityMappingTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKEntityMappingTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKFetchRequestMappingCacheTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKFetchRequestMappingCacheTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKHTTPUtilitiesTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKHTTPUtilitiesTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKInMemoryManagedObjectCacheTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKInMemoryManagedObjectCacheTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKManagedObjectMappingOperationDataSourceTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKManagedObjectMappingOperationDataSourceTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKManagedObjectSeederTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKManagedObjectSeederTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKManagedObjectStoreTest' started at 2014-01-05 18:19:35 +0000
Test Case '-[RKManagedObjectStoreTest testResetPersistentStoresDoesNotTriggerDeadlock]' started.
2014-01-05 13:19:35.108 otest[56417:303] CoreData: error: Mutating a managed object 0xcb7bcd0 x-coredata:///Human/tF985E34F-0B02-4D2F-A797-868A219D190A4 (0x28d08b0) after it has been removed from its context.
2014-01-05 13:19:35.109 otest[56417:303] CoreData: error: Mutating a managed object 0xcb7bcd0 x-coredata:///Human/tF985E34F-0B02-4D2F-A797-868A219D190A4 (0x28d08b0) after it has been removed from its context.
Test Case '-[RKManagedObjectStoreTest testResetPersistentStoresDoesNotTriggerDeadlock]' passed (0.098 seconds).
Test Case '-[RKManagedObjectStoreTest testThatAddingASQLiteStoreExcludesThePathFromiCloudBackups]' started.
Test Case '-[RKManagedObjectStoreTest testThatAddingASQLiteStoreExcludesThePathFromiCloudBackups]' passed (0.063 seconds).
Test Suite 'RKManagedObjectStoreTest' finished at 2014-01-05 18:19:35 +0000.
Executed 2 tests, with 0 failures (0 unexpected) in 0.161 (0.165) seconds
Test Suite 'RKMappingResultTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKMappingResultTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKMappingTestCoreDataIntegrationTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKMappingTestCoreDataIntegrationTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKMappingTestTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKMappingTestTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKObjectMappingNextGenTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKObjectMappingNextGenTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKObjectMappingOperationTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKObjectMappingOperationTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKObjectMappingTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKObjectMappingTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKObjectResponseSerializerTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKObjectResponseSerializerTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKParameterConstraintTests' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKParameterConstraintTests' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKPathUtilitiesTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKPathUtilitiesTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKRelationshipConnectionOperationTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKRelationshipConnectionOperationTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.017) seconds
Test Suite 'RKRelationshipMappingTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKRelationshipMappingTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKRequestDescriptorTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKRequestDescriptorTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKResponseDescriptorTest' started at 2014-01-05 18:19:35 +0000
Test Case '-[RKResponseDescriptorTest testBaseURLAndPathTemplateIsNilDescriptorMatchesAll]' started.
Test Case '-[RKResponseDescriptorTest testBaseURLAndPathTemplateIsNilDescriptorMatchesAll]' passed (0.001 seconds).
Test Case '-[RKResponseDescriptorTest testBaseURLIsNilAndPathTemplateAndURLAreNotMatch]' started.
Test Case '-[RKResponseDescriptorTest testBaseURLIsNilAndPathTemplateAndURLAreNotMatch]' passed (0.000 seconds).
Test Case '-[RKResponseDescriptorTest testBaseURLIsNilAndPathTemplateAndURLMatch]' started.
Test Case '-[RKResponseDescriptorTest testBaseURLIsNilAndPathTemplateAndURLMatch]' passed (0.000 seconds).
Test Case '-[RKResponseDescriptorTest testBaseURLIsNilAndPathTemplateAndURLMatchReturnsNonEmptyParameters]' started.
Test Case '-[RKResponseDescriptorTest testBaseURLIsNilAndPathTemplateAndURLMatchReturnsNonEmptyParameters]' passed (0.000 seconds).
Test Case '-[RKResponseDescriptorTest testBaseURLNotNilAndPathTemplateNilAndGivenURLHostnameDoesNotMatch]' started.
Test Case '-[RKResponseDescriptorTest testBaseURLNotNilAndPathTemplateNilAndGivenURLHostnameDoesNotMatch]' passed (0.000 seconds).
Test Case '-[RKResponseDescriptorTest testBaseURLNotNilAndPathTemplateNilAndGivenURLHostnameMatch]' started.
Test Case '-[RKResponseDescriptorTest testBaseURLNotNilAndPathTemplateNilAndGivenURLHostnameMatch]' passed (0.000 seconds).
Test Case '-[RKResponseDescriptorTest testDescriptorsWithDifferentConstraintsAreNotEqual]' started.
Test Case '-[RKResponseDescriptorTest testDescriptorsWithDifferentConstraintsAreNotEqual]' passed (0.001 seconds).
Test Case '-[RKResponseDescriptorTest testDescriptorsWithDifferentKeyPathsAreNotEqual]' started.
Test Case '-[RKResponseDescriptorTest testDescriptorsWithDifferentKeyPathsAreNotEqual]' passed (0.000 seconds).
Test Case '-[RKResponseDescriptorTest testDescriptorsWithDifferentMappingsAreNotEqual]' started.
Test Case '-[RKResponseDescriptorTest testDescriptorsWithDifferentMappingsAreNotEqual]' passed (0.000 seconds).
Test Case '-[RKResponseDescriptorTest testDescriptorsWithDifferentPathTemplatesAreNotEqual]' started.
Test Case '-[RKResponseDescriptorTest testDescriptorsWithDifferentPathTemplatesAreNotEqual]' passed (0.006 seconds).
Test Case '-[RKResponseDescriptorTest testDescriptorsWithDifferentStatusCodesAreNotEqual]' started.
Test Case '-[RKResponseDescriptorTest testDescriptorsWithDifferentStatusCodesAreNotEqual]' passed (0.000 seconds).
Test Case '-[RKResponseDescriptorTest testDescriptorsWithSameAttributesAreEqual]' started.
Test Case '-[RKResponseDescriptorTest testDescriptorsWithSameAttributesAreEqual]' passed (0.000 seconds).
Test Case '-[RKResponseDescriptorTest testIdenticalPathTemplatesWithDifferentBaseURL]' started.
Test Case '-[RKResponseDescriptorTest testIdenticalPathTemplatesWithDifferentBaseURL]' passed (0.000 seconds).
Test Case '-[RKResponseDescriptorTest testIdenticalPathTemplatesWithMatchingBaseURLAndPathAndQueryStringDoNotMatchPathTemplate]' started.
Test Case '-[RKResponseDescriptorTest testIdenticalPathTemplatesWithMatchingBaseURLAndPathAndQueryStringDoNotMatchPathTemplate]' passed (0.000 seconds).
Test Case '-[RKResponseDescriptorTest testIdenticalPathTemplatesWithMatchingBaseURLAndPathAndQueryStringMatchPathTemplate]' started.
Test Case '-[RKResponseDescriptorTest testIdenticalPathTemplatesWithMatchingBaseURLAndPathAndQueryStringMatchPathTemplate]' passed (0.001 seconds).
Test Case '-[RKResponseDescriptorTest testIdenticalPathTemplatesWithMatchingBaseURLAndPathIncludesQueryString]' started.
Test Case '-[RKResponseDescriptorTest testIdenticalPathTemplatesWithMatchingBaseURLAndPathIncludesQueryString]' passed (0.001 seconds).
Test Case '-[RKResponseDescriptorTest testResponseMatchesBaseURLAndPathTemplateAndNonMatchingStatusCode]' started.
Test Case '-[RKResponseDescriptorTest testResponseMatchesBaseURLAndPathTemplateAndNonMatchingStatusCode]' passed (0.001 seconds).
Test Case '-[RKResponseDescriptorTest testResponseMatchesBaseURLAndPathTemplateAndStatusCode]' started.
Test Case '-[RKResponseDescriptorTest testResponseMatchesBaseURLAndPathTemplateAndStatusCode]' passed (0.001 seconds).
Test Case '-[RKResponseDescriptorTest testResponseMatchesBaseURLButDoesNotMatchURLPathTemplateAndMatchingStatusCodes]' started.
Test Case '-[RKResponseDescriptorTest testResponseMatchesBaseURLButDoesNotMatchURLPathTemplateAndMatchingStatusCodes]' passed (0.000 seconds).
Test Case '-[RKResponseDescriptorTest testResponseMatchesBaseURLButDoesNotMatchURLPathTemplateAndNonMatchingStatusCodes]' started.
Test Case '-[RKResponseDescriptorTest testResponseMatchesBaseURLButDoesNotMatchURLPathTemplateAndNonMatchingStatusCodes]' passed (0.000 seconds).
Test Suite 'RKResponseDescriptorTest' finished at 2014-01-05 18:19:35 +0000.
Executed 20 tests, with 0 failures (0 unexpected) in 0.014 (0.062) seconds
Test Suite 'RKRouteSetTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKRouteSetTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKRouteTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKRouteTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKRouterTest' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKRouterTest' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'RKTestCase' started at 2014-01-05 18:19:35 +0000
Test Suite 'RKTestCase' finished at 2014-01-05 18:19:35 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite '/Users/ktran/Library/Developer/Xcode/DerivedData/RestKit-fijedlnqdbydrahgslkjxqlybywa/Build/Products/Debug-iphonesimulator/RestKitTests.octest(Tests)' finished at 2014-01-05 18:19:35 +0000.
Executed 23 tests, with 0 failures (0 unexpected) in 0.240 (0.314) seconds
Test Suite 'Multiple Selected Tests' finished at 2014-01-05 18:19:35 +0000.
Executed 23 tests, with 0 failures (0 unexpected) in 0.240 (0.352) seconds
Program ended with exit code: 0

@Kurry
Member
Kurry commented Jan 5, 2014

@segiddins I had asked Blake that before I wrote the tests and he said that XCTests don't run on iOS 6. I have to confirm that myself, but thats what he said, hence me doing them with SenTestCase. Everything else look OK?

@segiddins
Member

I'm stuck I'm laguardia now so I can't review

@Kurry
Member
Kurry commented Jan 5, 2014

@segiddins OK just confirmed the iOS 6/7 thing with XCTest. I didn't find it in the headers, but I did look at the Frameworks to draw a conclusion. See below:

screen shot 2014-01-05 at 1 30 21 pm
screen shot 2014-01-05 at 1 30 30 pm

As you can see the framework doesn't exist in the iOS 6.* developer frameworks, so you can't run them in the iOS 6 Simulator.

@blakewatters
Member

XCTest based tests cannot execute on iOS 6. We will stick with SenTestingKit until iOS 6 support is phased out.

Kurry added some commits Dec 25, 2013
@Kurry Kurry updated RKResponseDescriptor and migrated tests to SenTestCases
fixed issue with git submodule not pointing to public URL
fixed ternary statements and project file
8eb023f
@Kurry Kurry changed cibuild to use bundle 414977f
@Kurry Kurry Revert "changed cibuild to use bundle"
This reverts commit 414977f.
2036804
@blakewatters

This implementation is going to drop the port (if there is one). We’ll need a more robust implementation

@blakewatters blakewatters merged commit 2036804 into experimental/port-to-afnetworking-2.0 Jan 6, 2014

1 check failed

Details default The Travis CI build could not complete due to an error
@blakewatters
Member

I have merged this into the experimental branch and fixed up a missing property assignment for the mapping property.

@Kurry you need to design and implement tests for the parameter matching using the parameter constraints.

@segiddins and @Kurry The integration tests on the experimental branch now work and you guys should be able to see how all the pieces fit together now

@Kurry Kurry deleted the experimental/rkresponse-descriptor branch Feb 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment