Skip to content
Snippets Groups Projects
Commit ef13e5b3 authored by Thomas BREIL's avatar Thomas BREIL
Browse files

Add XP without level up test

parent 6d55823c
Branches main
No related tags found
No related merge requests found
......@@ -149,6 +149,7 @@ public class UnitTests {
player adventurer1 = new player("Adventurer", "Adv1", "ADVENTURER", 200, new ArrayList<>());
player adventurer2 = new player("Adventurer", "Adv1", "ADVENTURER", 200, new ArrayList<>());
adventurer1.healthpoints = 50;
adventurer2.healthpoints = 50;
......@@ -163,5 +164,12 @@ public class UnitTests {
}
@Test
@DisplayName("Test addXP without level up")
void testAddXpWithoutLevelUp() {
player player = new player("Florian", "Gnognak le Barbare", "ARCHER", 200, new ArrayList<>());
UpdatePlayer.addXp(player, 2);
assertThat(player.getXp(), is(2));
}
}
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