-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Testing player status calculations
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/test/java/edu/ntnu/idi/idatt2003/g40/mappe/PlayerStatusTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
| } | ||
| } |