Inherits from NSObject
Declared in RKMappingTestExpectation.h
RKMappingTestExpectation.m

Overview

An RKMappingTestExpectation defines an expected mapping event that should occur during the execution of a RKMappingTest.

Tasks

Creating Expectations

Expectation Values

Properties

destinationKeyPath

Returns a keyPath on the destination object that a value should be mapped to.

@property (nonatomic, copy, readonly) NSString *destinationKeyPath

Declared In

RKMappingTestExpectation.h

evaluationBlock

A block used to evaluate if the expectation has been satisfied.

@property (nonatomic, copy, readonly) BOOL ( ^ ) ( RKObjectAttributeMapping *mapping , id value ) evaluationBlock

Declared In

RKMappingTestExpectation.h

sourceKeyPath

Returns a keyPath on the source object that a value should be mapped from.

@property (nonatomic, copy, readonly) NSString *sourceKeyPath

Declared In

RKMappingTestExpectation.h

value

Returns the expected value that should be set to the destinationKeyPath of the destination object.

@property (nonatomic, strong, readonly) id value

Declared In

RKMappingTestExpectation.h

Class 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.

+ (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath

Parameters

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 destionationKeyPath.

Declared In

RKMappingTestExpectation.h

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.

+ (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath evaluationBlock:(BOOL ( ^ ) ( RKObjectAttributeMapping *mapping , id value ))evaluationBlock

Parameters

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 destionationKeyPath with value.

Declared In

RKMappingTestExpectation.h

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.

+ (RKMappingTestExpectation *)expectationWithSourceKeyPath:(NSString *)sourceKeyPath destinationKeyPath:(NSString *)destinationKeyPath value:(id)value

Parameters

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 destionationKeyPath with value.

Declared In

RKMappingTestExpectation.h

Instance Methods

mappingDescription

Returns a string summary of the expected keyPath mapping within the expectation

- (NSString *)mappingDescription

Return Value

A string describing the expected sourceKeyPath to destinationKeyPath mapping.

Declared In

RKMappingTestExpectation.h