Skip to content

Commit

Permalink
Added to PlayerTypeTest and UserInterfaceTest
Browse files Browse the repository at this point in the history
  • Loading branch information
bmares authored and bmares committed Apr 17, 2024
1 parent 59425f7 commit 7d7d183
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/java/uta/cse3310/PlayerTypeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,9 @@ public void checkValidNicknameAndColor() {
assertEquals(PlayerType.Status.Waiting, player.getStatus());
}

@Test
public void checkPlayerIsPlaying() {
PlayerType player = new PlayerType("Anthony", "Green", PlayerType.Status.Playing);
assertEquals(PlayerType.Status.Playing, player.getStatus());
}
}
12 changes: 12 additions & 0 deletions src/test/java/uta/cse3310/UserInterfaceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ public void testSetReadyUp() {
assertTrue(userInterface.getReadyUp());
}

@Test
public void testUnReadyUp(){
// Create a UserInterface object with readyUp set to true
UserInterface userInterface = new UserInterface(true);

// Set readyUp to false
userInterface.setReadyUp(false);

// Verify that getReadyUp returns false after setting it to false
assertFalse(userInterface.getReadyUp());
}

// Add more test methods as needed to cover other functionalities of the UserInterface class
}

Binary file modified target/test-classes/uta/cse3310/PlayerTypeTest.class
Binary file not shown.
Binary file modified target/test-classes/uta/cse3310/UserInterfaceTest.class
Binary file not shown.

0 comments on commit 7d7d183

Please sign in to comment.