-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathYourPlayerTest.java
More file actions
49 lines (35 loc) · 1.14 KB
/
YourPlayerTest.java
File metadata and controls
49 lines (35 loc) · 1.14 KB
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
package com.hangman.players;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
public class YourPlayerTest {
@Test
public void GuessesSomething() {
new YourPlayer().GetGuess(Arrays.asList('b'));
}
@Test
public void EnsureSpotTrackingIntegrity() {
YourPlayer player = new YourPlayer();
player.GetGuess(Arrays.asList('_', '_', '_'));
assertEquals(3, player.getEmptySpotPositions().size());
}
@Test
public void EnsureGuessCount() {
YourPlayer player = new YourPlayer();
assertEquals(0, player.getTotalGuessCount());
player.GetGuess(Arrays.asList('_', '_', '_'));
assertEquals(1, player.getTotalGuessCount());
}
@Test
public void EnsureNoGuess() {
YourPlayer player = new YourPlayer();
assertEquals((char)0, (char)player.getLastGuess());
player.GetGuess(Arrays.asList('_'));
assertNotEquals((char) 0, (char) player.getLastGuess());
}
@Test
public void EnsureRecentGuesses() {
}
}