Inherits from NSObject
Declared in RKConnectionTestExpectation.h

Overview

An RKConnectionTestExpectation object defines an expectation that a Core Data relationship is connected during the execution of a RKMappingTest. These expectation are used to unit test a connection specified via an RKConnectionDescription object.

Tasks

Creating Expectations

Accessing Expectation Details

  •   relationshipName

    The name of the relationship that is expected to be connected. Cannot be nil.

    property
  •   attributes

    The dictionary of attributes that are expected to be used when the connection is established. May be nil.

    property
  •   value

    The value that is expected to be set for the relationship when connected. May be nil.

    property
  • – summary

    Returns a string summary of the connection that is expected to be established.

Properties

attributes

The dictionary of attributes that are expected to be used when the connection is established. May be nil.

@property (nonatomic, copy, readonly) NSDictionary *attributes

Declared In

RKConnectionTestExpectation.h

relationshipName

The name of the relationship that is expected to be connected. Cannot be nil.

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

Declared In

RKConnectionTestExpectation.h

value

The value that is expected to be set for the relationship when connected. May be nil.

@property (nonatomic, strong, readonly) id value

Discussion

A value of nil indicates that expectation does not specify an exact value for the connection, only that it was set during the execution of the test. A value of [NSNull null] indicates that the connection is expected to be connected to a nil value.

Declared In

RKConnectionTestExpectation.h

Class Methods

expectationWithRelationshipName:attributes:value:

Creates and returns a connection expectation for the specified relationship name, attributes dictionary, and value.

+ (instancetype)expectationWithRelationshipName:(NSString *)relationshipName attributes:(NSDictionary *)attributes value:(id)value

Parameters

relationshipName

The name of the relationship expected to be connected.

attributes

A dictionary specifying the attributes that are expected to be used to establish the connection.

value

The value that is expected to be set for the relationship when the connection is established.

Return Value

A newly constructed connection expectation, initialized with the given relationship name, attributes dictionary, and expected value.

Declared In

RKConnectionTestExpectation.h

Instance Methods

initWithRelationshipName:attributes:value:

Initializes the receiver with the given relationship name, attributes dictionary, and value.

- (id)initWithRelationshipName:(NSString *)relationshipName attributes:(NSDictionary *)attributes value:(id)value

Parameters

relationshipName

The name of the relationship expected to be connected.

attributes

A dictionary specifying the attributes that are expected to be used to establish the connection.

value

The value that is expected to be set for the relationship when the connection is established.

Return Value

The receiver, initialized with the given relationship name, attributes dictionary, and expected value.

Declared In

RKConnectionTestExpectation.h

summary

Returns a string summary of the connection that is expected to be established.

- (NSString *)summary

Return Value

A string describing the expected connection.

Declared In

RKConnectionTestExpectation.h