Skip to content

Commit

Permalink
Merge pull request #7 from qwrwtdycuvjbk/patch-6
Browse files Browse the repository at this point in the history
Create LeaderboardTest.java
  • Loading branch information
qwrwtdycuvjbk authored Apr 29, 2024
2 parents 86e2ff0 + 769c788 commit d3cae91
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/java/wordsearch/LeaderboardTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import org.junit.Test;
import static org.junit.Assert.assertEquals;

public class LeaderBoardTest {

@Test
public void testConstructorAndGetters() {

Player player = new Player("John");


LeaderBoard leaderBoard = new LeaderBoard(player, 1000, 1);

assertEquals("John", leaderBoard.getPlayer().getName());
assertEquals(1000, leaderBoard.getPlayerScore());
assertEquals(1, leaderBoard.getRank());
}
}

0 comments on commit d3cae91

Please sign in to comment.