From 99f1aca73ded398650b1e3f8bdb0c2e35b6b4945 Mon Sep 17 00:00:00 2001 From: 2onefan2 <159247397+2onefan2@users.noreply.github.com> Date: Sat, 27 Apr 2024 21:39:11 -0500 Subject: [PATCH] Updated test cases to validate the new functionality of randomly placing words on the grid in the GridField class --- src/test/java/uta/cse3310/GridFieldTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/java/uta/cse3310/GridFieldTest.java b/src/test/java/uta/cse3310/GridFieldTest.java index f35c184..8dac998 100644 --- a/src/test/java/uta/cse3310/GridFieldTest.java +++ b/src/test/java/uta/cse3310/GridFieldTest.java @@ -76,5 +76,10 @@ public void testPlaceRandomWords() { // Check if the grid size is within a reasonable range assertTrue(grid.length >= 5 && grid.length <= 10); assertTrue(grid[0].length >= 5 && grid[0].length <= 10); + + // Check if all words from the word list are placed on the grid + for (String word : wordList) { + assertTrue(gridField.checkWord(word)); + } } }