Commit Graph

114 Commits

Author SHA1 Message Date
Blake Watters
8dc54a89b2 Major overhaul to the Core Data managed object identification and relationship connection support.
* Replaces primary key with `RKEntityIdentifier`
* Add support for use of compound keys for object identification
* Refactor `RKConnectionMapping` to `RKConnectionDescription` and add support for connecting with multiple attributes
* Clarify naming of representation key methods to better match naming conventions
* Add type transformation support for object identification
* Greatly expand test coverage for object identification
* Drop the `NSEntityDescription` category
* Simplify the `RKManagedObjectCaching` protocol
* Add compound key support to the Fetch Request and In Memory Cache implementations
* Replace Kiwi with Specta for tests where contexts are helpful for organization
* Rename `defaultValueForMissingAttribute` to `defaultValueForAttribute`
2012-11-27 10:29:36 -05:00
Blake Watters
54dce20ac6 Rework paginator support for 0.20. closes #1024, #900, #759
* Renamed RKObjectPaginator to RKPaginator for simplicity
* Removed delegate on paginator in favor of simple success/failure blocks
* Added `willMapDeserializedResponseBlock` for manipulating the response body before mapping begins
* Added support for cancelling an in-progress pagination request
2012-11-18 22:44:33 -05:00
Blake Watters
91c61640fa Remove invalid references to RKParser 2012-11-13 12:32:49 -05:00
Blake Watters
56aaf30a73 Switch the test factory to using blocks instead a famously named category. Add basic example to the header docs. 2012-11-08 19:31:38 -05:00
Blake Watters
a87eeb0224 Drop test factory managed object store filename properties. Unimplemented and unnecessary. You can override the store factory to perform any cutomization. 2012-11-08 19:29:05 -05:00
Jeff Arena
5f8c7f3d42 Add tearDown execution during first run of setup. 2012-11-08 16:04:59 -05:00
Blake Watters
7f7bef3e9f Remove superfluous baseURLString methods from RKTestFactory 2012-11-05 18:38:24 -05:00
Blake Watters
c44f4010fa Add support for specifying a configuration and customizing the options when adding a SQLite persistent store to the managed object store. closes #984 2012-10-29 00:32:56 -04:00
Blake Watters
dfc27be911 Cancel response mapping operations during tear down 2012-10-22 19:31:30 -04:00
Blake Watters
f93a044561 Add error condition when attempting to map an RKEntityMapping containing connection mappings with a nil managed object cache.
* Add support for the data source to fail mapping operation with an error.
* Clean up error handling within RKMappingOperation
2012-10-21 15:47:16 -04:00
Blake Watters
7bed7b6f03 Update stubbing routines for fetch requests to support copying of fetch request blocks that require parameters to construct a matching URL 2012-10-20 13:21:23 -04:00
Blake Watters
df55f0e524 Enable support for testing dynamic mappings with RKMappingTest 2012-10-18 14:09:00 -04:00
Blake Watters
845de91e80 Update RKMappingTest to support easier testing of RKEntityMapping objects by reducing the amount of required configuration to get a test configured. 2012-10-15 19:27:35 -04:00
Blake Watters
877ce255b5 Expand test coverage and fix situations where requests would unexpectedly initialize incorrectly without error
* RKObjectParameterization now returns an empty dictionary if mapping produces an unmappable representation error (no mappable attributes/relationships found)
* Log errors if request construction results in an NSError and return nil
* Ensure errors are passed back up through object parameterization instead of just returning nil
* Reset the serialization MIME Type registry during RKTestFactory set up to ensure it is in a sane state
* Convert Hamcrest matchers to Expecta in the object mapper tests to fix infinite recursion on test failure (will need to completely phase out Hamcrest soon)
2012-10-05 19:16:55 -04:00
Blake Watters
0dc21fb95d Add caching helpers to the RKTestHelpers interface 2012-10-05 14:22:56 -04:00
Blake Watters
a10df02bf9 Add RKTestHelpers class containing helpful methods when working with object managers in unit and integration tests 2012-10-02 22:55:17 -04:00
Blake Watters
bacb6e8ba4 Remove RKTestResponseLoader 2012-10-02 22:10:36 -04:00
Blake Watters
174372dcf5 Fix a number of warnings about potential dereference of null pointer 2012-10-02 15:52:45 -04:00
Blake Watters
3fc5a75a3a Tear down the search indexing environment as part of RKTestFactory tear down 2012-10-01 17:38:07 -04:00
Blake Watters
991a6fd733 Add cancellation of all oeprations during test factory tear down 2012-10-01 11:53:28 -04:00
Blake Watters
d95fe5cd44 Break out reused functions for object mapping introspection into RKObjectUtilities 2012-09-30 12:49:59 -04:00
Blake Watters
1c6564f823 Expand the capabilities of the RKMappingTest and RKMappingTestExpectation classes to support the Kiwi matchers.
* Enable evaluation blocks to return an NSError describing the failure
* Align all RKAttributeMapping references to RKPropertyMapping
* Cleanup docs
* Add `RKMappingTestExpectationTestCondition` macro for succinctly implementing mapping test evaluation blocks
* Clean up descriptions for better output from Kiwi
2012-09-29 17:54:52 -04:00
Blake Watters
4230c63f80 Add support for shared factory object instances 2012-09-29 17:54:52 -04:00
Blake Watters
5d41bf7ada Added new functionality to the mapping test to enable evaluating a single expectation without raising an exception. For use with the Kiwi matchers.
* Added error domain and codes specific for the mapper
* Migrated from using an NSString to real NSError objects
* Toned down the verbosity of error output for readability
* Cleaned up comment formatting
* Changed RKAttributeMapping to RKPropertyMapping for better alignment with the realities of the data model
2012-09-28 14:59:57 -04:00
Blake Watters
8a449a0fd4 Remove dead logging components 2012-09-27 20:16:20 -04:00
Blake Watters
fd16081797 Merge pull request #950 from aharren/feature/reboot-networking-layer
Use embedded variant of LibComponentLogging with prefix RK
2012-09-27 16:13:42 -07:00
Blake Watters
6c463bfb6b Raise an exception if the fixture fails to parse rather than returning nil 2012-09-27 17:05:25 -04:00
Arne Harren
bc7c65f03b Switch to an embedded variant of LibComponentLogging with prefix RK 2012-09-27 21:47:36 +02:00
Blake Watters
235f5fc579 Fix all build errors in unit tests. Restore execution of core mapping tests. 2012-09-24 22:44:20 -04:00
Blake Watters
654364af61 Document RKDynamicMappingMatcher and clean up API 2012-09-21 22:59:43 -04:00
Blake Watters
43be066e0b Docs touch ups 2012-09-21 22:58:17 -04:00
Blake Watters
6815ba6444 API refresh for mapping layer. Converted RKObjectMapper to RKMapperOperation. Expanded documentation. 2012-09-21 17:55:32 -04:00
Jeff Arena
6d11a5f88a Add additional cache clearing to address KIF issues. 2012-09-21 16:47:17 -04:00
Blake Watters
7e816904ff Docs update. Eliminate mappingOperationFromObject: 2012-09-20 19:11:38 -04:00
Blake Watters
bd4130a546 Eliminate aggregate import of RestKit.h from .NET date formatter and test factory 2012-09-20 11:59:02 -04:00
Blake Watters
991ced34da Docs for mapping operation data source. Still don't love the method names. Maybe we can eliminate this somehow... 2012-09-20 08:12:29 -04:00
Blake Watters
b6e8050842 Remove shared instance configuration from the test factory. Instances should be explicitly managed for sanity. 2012-09-19 12:15:55 -04:00
Blake Watters
ce0badad4c Docs formatting refresh on the test factory 2012-09-19 12:15:16 -04:00
Blake Watters
fea908702d Don't clear defaultDateFormatters during Test Factory setUp 2012-09-18 15:54:36 -04:00
Blake Watters
ef0462ec2a Appledoc warning fixes 2012-09-13 07:27:48 -04:00
Blake Watters
f636f8681a Fix warning 2012-09-12 21:16:24 -04:00
Blake Watters
3afc7c3501 Misc updates to RKTestFactory
* Add `objectFromFactory:properties:` this may deprecate `objectFromFactory:` in the future.
* Add `insertManagedObjectForEntityForName:inManagedObjectContext:withProperties:`. This helper method creates managed object instances in a given context (defaulting to the main queue context), sets its properties using an optional dictionary, and obtains a permanent `NSManagedObjectID` before returning. This is intended to reduce the boilerplate required to construct managed object factories.
2012-09-12 16:29:46 -04:00
Blake Watters
c1cb8c881d Migrate directory utilities to path utilities. Move Bundle category to Testing 2012-09-11 16:46:33 -04:00
Blake Watters
bed7779be4 Kill default mapping queue. Basic header docs for RKObjectManager 2012-09-06 11:48:31 -04:00
Blake Watters
22a68baf0c Rework podspec to organize header file imports to match existing RestKit releases 2012-09-05 11:04:42 -04:00
Blake Watters
a74b8717dc Pulling out RKURL in favor of vanilla NSURL 2012-09-03 17:07:09 -04:00
Blake Watters
f16d995053 Remove unnecessary initializer and syntehsized ivars from RKMappingTest 2012-09-02 18:41:20 -04:00
Jawwad Ahmad
8cbdb5f7ed Trailing whitespace cleanup from files in the Code directory.
Used the following command from within the Code dir:
git ls-files *.m *.h *.json | xargs /usr/bin/sed -i '' -E 's/[[:space:]]*$//'
2012-09-02 12:51:45 -04:00
Jawwad Ahmad
c70ab49457 Delete @synthesize statements that are no longer needed. (Works with current 4.4.1 release of Xcode). 2012-09-02 12:28:45 -04:00
Blake Watters
114ac214b1 Remove mapping provider test factory definition 2012-08-29 19:00:11 -04:00