Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)testNotificationWhenEditingNonTodayStat
- {
- // given
- id mock = [OCMockObject observerMock];
- [[NSNotificationCenter defaultCenter] addMockObserver:mock name:FGNPastStatWasUpgraded object:nil];
- [[mock expect] notificationWithName:FGNPastStatWasUpgraded object:nil];
- _this.date = [DLCommon dateFromString:@"2010-04-01"];
- // when
- _this.reviewedValue++;
- // then
- [mock verify];
- [[NSNotificationCenter defaultCenter] removeObserver:mock];
- }
- - (void)testNotificationNotSentWhenEditingTodayStats
- {
- // given
- id mock = [OCMockObject observerMock];
- [[NSNotificationCenter defaultCenter] addMockObserver:mock name:FGNPastStatWasUpgraded object:nil];
- _this.date = TODAY;
- // when
- _this.reviewedValue++;
- // then
- [mock verify];
- [[NSNotificationCenter defaultCenter] removeObserver:mock];
- }
Add Comment
Please, Sign In to add comment