Add: OrderPlayerTest
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
package it.polimi.ingsw.gc14.Model.Orders;
|
||||||
|
|
||||||
|
import it.polimi.ingsw.gc14.Model.Player;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
|
||||||
|
class OrderPlayerTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void toStringShouldReturnUsernameAndPlayedStatusTrue() {
|
||||||
|
Player player = new Player("Marco");
|
||||||
|
OrderPlayer orderPlayer = new OrderPlayer(player, true);
|
||||||
|
|
||||||
|
assertEquals("Marco true", orderPlayer.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void toStringShouldReturnUsernameAndPlayedStatusFalse() {
|
||||||
|
Player player = new Player("Luca");
|
||||||
|
OrderPlayer orderPlayer = new OrderPlayer(player, false);
|
||||||
|
|
||||||
|
assertEquals("Luca false", orderPlayer.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user