-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathYourPlayerTest.java
More file actions
35 lines (25 loc) · 920 Bytes
/
YourPlayerTest.java
File metadata and controls
35 lines (25 loc) · 920 Bytes
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
package com.hangman.players;
import org.junit.Test;
import java.util.Arrays;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
public class YourPlayerTest {
@Test
public void GuessesAWhenThereAreNoSuccessfulCharactersGuessedYet() {
YourPlayer player = new YourPlayer();
char guess = player.GetGuess(Arrays.asList('_', '_', '_'));
assertEquals('a', guess);
}
@Test
public void GuessesAWhenThereAreSuccessfulCharactersGuessedThatAreNotA() {
YourPlayer player = new YourPlayer();
char guess = player.GetGuess(Arrays.asList('m', '_', 'n'));
assertEquals('a', guess);
}
@Test
public void GuessesAWhenAIsThereAreAsInTheClueAsWell() {
YourPlayer player = new YourPlayer();
char guess = player.GetGuess(Arrays.asList('_', 'a', '_'));
assertNotEquals('a', guess);
}
}