Commit Graph

124 Commits

Author SHA1 Message Date
Blake Watters
7c9264025f Add type for managedObjectStore in the factory 2013-02-04 10:44:04 -05:00
Blake Watters
45e3366b7c Reorder RKTestFactory dispatching of the tear down block so that you have reference to the current environment to perform the tearDown 2013-02-01 19:00:56 -05:00
Blake Watters
226f3f7dc7 Fix static analyzer warning about uninitialized success variable in RKMappingTest 2013-01-06 00:46:14 -05:00
Blake Watters
9005bd573c Add test coverage and fixes for RKMappingTest. closes #1086 2013-01-03 18:19:50 -05:00
Blake Watters
9dc08ca27b Drop instancetype from init methods since the compiler will infer it 2013-01-01 15:27:01 -05:00
Blake Watters
b78deb3eed Use instancetype in constructors for increased subclassing friendliness 2012-12-22 14:54:49 -05:00
Blake Watters
3fe377c03a Remove another pair of keyed subscript access instances 2012-12-10 17:18:00 -05:00
Blake Watters
1c86cfab75 Improve RKManagedObjectRequestOperation handling for DELETE requests and expand test coverage
* Failure to match a response descriptor no longer fails DELETE requests
2012-12-09 23:24:45 -05:00
Blake Watters
4c735bafdd Updated mapping test API for 0.20
* Reimplemented connection tests to work with `RKConnectionDescription`. Introduced new `RKConnectionTestExpectation` class
* Slimmed down API by removing proxy methods on `RKMappingTest`
* Eliminated `verifiesOnExpect` behavior in favor of using `evaluateExpectation:`
* Ensured compatibility with RKKiwiMatchers
2012-12-09 12:24:30 -05:00
Blake Watters
5685a5fb60 Add test case investigating #921 2012-12-07 18:25:47 -05:00
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