-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindWinnerTest.h
52 lines (40 loc) · 1.03 KB
/
FindWinnerTest.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef FIND_WINNER_TEST_H
#define FIND_WINNER_TEST_H
#include <cppunit/extensions/HelperMacros.h>
#include "FindWinner.h"
/*
* A test case to exercise
* features of the FindWinner Class
*
*/
class FindWinnerTest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE( FindWinnerTest );
CPPUNIT_TEST( humanWinner );
CPPUNIT_TEST( allHumanWinners );
CPPUNIT_TEST( computerWinner );
CPPUNIT_TEST( allComputerWinners );
CPPUNIT_TEST( makeWinner );
CPPUNIT_TEST( checkBlockedMoves );
CPPUNIT_TEST( checkNotBlockedMoves );
CPPUNIT_TEST_SUITE_END();
public:
FindWinnerTest() : human_m(), computer_m(), game_m(&human_m, &computer_m) {};
~FindWinnerTest() {};
void setUp();
void tearDown();
protected:
void humanWinner();
void allHumanWinners();
void computerWinner();
void allComputerWinners();
void makeWinner();
void checkBlockedMoves();
void checkNotBlockedMoves();
private:
Player human_m;
Player computer_m;
Game game_m;
FindWinner finder_m;
};
#endif // FIND_WINNER_TEST_H