RKPropertyMappingTestExpectation Class Reference
| Inherits from | NSObject |
| Declared in | RKPropertyMappingTestExpectation.h |
Overview
An RKMappingTestExpectation object defines an expected mapping event that should occur during the execution of a RKMappingTest.
Tasks
Creating Expectations
-
+ expectationWithSourceKeyPath:destinationKeyPath:Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object. The value mapped is not evaluated.
-
+ expectationWithSourceKeyPath:destinationKeyPath:value:Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object with a given value.
-
+ expectationWithSourceKeyPath:destinationKeyPath:evaluationBlock:Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object and that the attribute mapping and value should evaluate to true with a given block.
-
+ expectationWithSourceKeyPath:destinationKeyPath:mapping:Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object using a specific object mapping for the relationship.
Expectation Values
-
sourceKeyPathReturns a keyPath on the source object that a value should be mapped from.
property -
destinationKeyPathReturns a keyPath on the destination object that a value should be mapped to.
property -
valueReturns the expected value that should be set to the destinationKeyPath of the destination object.
property -
evaluationBlockA block used to evaluate if the expectation has been satisfied.
property -
mappingReturns the expected object mapping to be used for mapping a nested relationship.
property -
– summaryReturns a string summary of the expected keyPath mapping within the expectation
Properties
destinationKeyPath
Returns a keyPath on the destination object that a value should be mapped to.
@property (nonatomic, copy, readonly) NSString *destinationKeyPathDeclared In
RKPropertyMappingTestExpectation.hevaluationBlock
A block used to evaluate if the expectation has been satisfied.
@property (nonatomic, copy, readonly) RKMappingTestExpectationEvaluationBlock evaluationBlockDiscussion
The block accepts three arguments, an RKPropertyMapping object denoting the attribute or relationship that was mapped, the mapped value, and a pointer to an error object that is to be set if the block evaluates negatively, and returns a Boolean value indicating if the mapping satisfies the expectations of the block.
Declared In
RKPropertyMappingTestExpectation.hmapping
Returns the expected object mapping to be used for mapping a nested relationship.
@property (nonatomic, strong, readonly) RKMapping *mappingDeclared In
RKPropertyMappingTestExpectation.hsourceKeyPath
Returns a keyPath on the source object that a value should be mapped from.
@property (nonatomic, copy, readonly) NSString *sourceKeyPathDeclared In
RKPropertyMappingTestExpectation.hvalue
Returns the expected value that should be set to the destinationKeyPath of the destination object.
@property (nonatomic, strong, readonly) id valueDeclared In
RKPropertyMappingTestExpectation.hClass Methods
expectationWithSourceKeyPath:destinationKeyPath:
Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object. The value mapped is not evaluated.
+ (instancetype)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPathParameters
- sourceKeyPath
A key path on the source object that should be mapped.
- destinationKeyPath
A key path on the destination object that should be mapped onto.
Return Value
An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath.
Declared In
RKPropertyMappingTestExpectation.hexpectationWithSourceKeyPath:destinationKeyPath:evaluationBlock:
Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object and that the attribute mapping and value should evaluate to true with a given block.
+ (instancetype)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath evaluationBlock:(RKMappingTestExpectationEvaluationBlock)evaluationBlockParameters
- sourceKeyPath
A key path on the source object that should be mapped.
- destinationKeyPath
A key path on the destination object that should be mapped onto.
- evaluationBlock
A block with which to evaluate the success of the mapping.
Return Value
An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath with value.
Declared In
RKPropertyMappingTestExpectation.hexpectationWithSourceKeyPath:destinationKeyPath:mapping:
Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destinaton object using a specific object mapping for the relationship.
+ (instancetype)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath mapping:(RKMapping *)mappingParameters
- sourceKeyPath
A key path on the source object that should be mapped.
- destinationKeyPath
A key path on the destination object that should be mapped onto.
Return Value
An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath using a specific object mapping.
Declared In
RKPropertyMappingTestExpectation.hexpectationWithSourceKeyPath:destinationKeyPath:value:
Creates and returns a new expectation specifying that a key path in a source object should be mapped to another key path on a destination object with a given value.
+ (instancetype)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath value:(id)valueParameters
- sourceKeyPath
A key path on the source object that should be mapped.
- destinationKeyPath
A key path on the destination object that should be mapped onto.
- value
The value that is expected to be assigned to the destination object at destinationKeyPath.
Return Value
An expectation specifying that sourceKeyPath should be mapped to destinationKeyPath with value.
Declared In
RKPropertyMappingTestExpectation.hInstance Methods
summary
Returns a string summary of the expected keyPath mapping within the expectation
- (NSString *)summaryReturn Value
A string describing the expected sourceKeyPath to destinationKeyPath mapping.
Declared In
RKPropertyMappingTestExpectation.h