Skip to content
Snippets Groups Projects
Commit f124484b authored by Yerdana Jengiskhan's avatar Yerdana Jengiskhan
Browse files

Upload New File

parent e70c48c0
No related branches found
No related tags found
No related merge requests found
// ✅ GameRunnerTests.java - Making sure our game logic is rock solid!
// Author: Yerdana Jengiskhan
// Course: CPSC219W
// Reference: JUnit 5 official documentation
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import java.util.Set;
import java.util.HashSet;
public class GameRunnerTests {
@Test
public void testIsCorrectGuess() {
Set<String> words = new HashSet<>();
words.add("apple");
WordGame game = new WordGame(words);
assertTrue(game.isCorrectGuess("apple"), "The guess should be correct!");
assertFalse(game.isCorrectGuess("grape"), "The guess should be incorrect!");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment