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.

    property

Properties

attributes

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

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

Declared In

RKConnectionTestExpectation.h

relationshipName

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

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

Declared In

RKConnectionTestExpectation.h

summary

@property (nonatomic, readonly, copy) NSString *summary
Discussion

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

Return Value

A string describing the expected connection.

Declared In

RKConnectionTestExpectation.h

value

@property (nonatomic, strong, readonly) id value
Discussion

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

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:

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

Creates and returns a connection expectation for the specified relationship name, attributes dictionary, and 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:

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

Initializes the receiver with the given relationship name, attributes dictionary, and 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