-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestHumanPlayer.m
38 lines (28 loc) · 1.11 KB
/
TestHumanPlayer.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// TestHumanPlayer.m
// MathWars
//
// Created by Inf on 01.03.10.
// Copyright 2010 Soulteam. All rights reserved.
//
#import <OCMock/OCMock.h>
#import "Puzzle.h"å
#import "HumanPuzzle.h"
#import "TestHumanPlayer.h"
@implementation TestHumanPlayer
-(void)setUp {
player = [[HumanPlayer alloc] init];
}
-(void)testPuzzleCreation {
/*id mockDelegate = [OCMockObject mockForProtocol:@protocol(PuzzleDelegate)];
id mockPlayerDelegate = [OCMockObject mockForProtocol:@protocol(HumanPlayerDelegate)];
player.delegate = mockPlayerDelegate;
Puzzle* delegatePuzzle;
// [[mockPlayerDelegate expect] puzzleCreated:[OCMArg setTo:delegatePuzzle]];
Puzzle* puzzle = [player createPuzzleOfDifficulty:1 withDelegate:mockDelegate];
STAssertTrue([puzzle isKindOfClass:[HumanPuzzle class]], @"HumanPlayer должен создавать HumanPuzzle");
STAssertEquals(puzzle.delegate, mockDelegate, @"Делегат задан неверно");
[mockPlayerDelegate verify];
STAssertEquals(delegatePuzzle, puzzle, @"Делегат толжен получить тот же паззл что и вызывающий");*/
}
@end