Skip to content

Commit

Permalink
Feat: Testing player status calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyah committed Apr 9, 2026
1 parent 25e96a7 commit 08bd55b
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package edu.ntnu.idi.idatt2003.g40.mappe;

import org.junit.jupiter.api.Test;

import java.math.BigDecimal;

import static org.junit.jupiter.api.Assertions.*;

class PlayerStatusTest {

@Test
void getStatusReturnsProperStatuses() {
Player testPlayer = new Player("Player", new BigDecimal(1000));
PlayerStatus gottenStatus = PlayerStatusController.getStatus(testPlayer);
assertEquals(PlayerStatus.NOOB, gottenStatus);

testPlayer.addMoney(new BigDecimal(1000));
PlayerStatus gottenStatus2 = PlayerStatusController.getStatus(testPlayer);

assertEquals(PlayerStatus.TRYHARD, gottenStatus2);
}
}

0 comments on commit 08bd55b

Please sign in to comment.