Browse Source

unittest: created test for player class

This tests the name of the player
remotes/origin/develop
David Hermann 2 years ago
parent
commit
9acf819d35
  1. 26
      src/test/java/org/bitbiome/entitiesTest/PlayerTest.java

26
src/test/java/org/bitbiome/entitiesTest/PlayerTest.java

@ -0,0 +1,26 @@
package org.bitbiome.entitiesTest;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.bitbiome.entities.Player;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
public class PlayerTest {
private static Player player;
@BeforeAll
public static void setPlayer() {
player = new Player();
player.setName("UnitPlayer");
}
@Test
public void testPlayerName() {
assertEquals("UnitPlayer", player.getName());
}
}
Loading…
Cancel
Save