Inherits from NSObject
Declared in ESNowDateMock.h
ESNowDateMock.m

Overview

A class to safely mock the [NSDate nowDate] method in unit tests.

Instance Methods

disableMock

Removes the swizzling. Note : Safe to invoke multiple times.

- (void)disableMock

Declared In

ESNowDateMock.h

enableMock

Activates the mock. Note : Safe to invoke multiple times.

- (void)enableMock

Declared In

ESNowDateMock.h

initWithAnsiDate:

Constructs the mock that will always return the specified date.

- (id)initWithAnsiDate:(NSDate *)date_

Parameters

date_

A date to return in the [NSDate nowDate] method.

Return Value

A properly initialized mock object.

Declared In

ESNowDateMock.h

initWithAnsiDateString:

Constructs the mock that will always return the specified date.

- (id)initWithAnsiDateString:(NSString *)dateStr_

Parameters

dateStr_

An ANSI formatted date to return in the [NSDate nowDate] method.

Return Value

A properly initialized mock object.

Declared In

ESNowDateMock.h