Add: Decks Create Slots

This commit is contained in:
rubenpirreram
2026-03-21 17:15:10 +01:00
parent c0733f4cd6
commit 1f966484b8
6 changed files with 160 additions and 34 deletions
@@ -7,29 +7,32 @@ import static org.junit.jupiter.api.Assertions.*;
class SlotTest {
@Test
void SlotWrongArgument() { // TODO: Cos'è il parametro nMinPlayer? come va testato?
void SlotWrongArgument() {
assertDoesNotThrow(() -> {
Slot sl1 = new Slot(0,0,1,1);
Slot sl1 = new Slot('A');
});
assertDoesNotThrow(() -> {
Slot sl1 = new Slot(0,1,0,1);
Slot sl1 = new Slot('B');
});
assertDoesNotThrow(() -> {
Slot sl1 = new Slot(1,0,0,1);
Slot sl1 = new Slot('C');
});
assertDoesNotThrow(() -> {
Slot sl1 = new Slot(1,1,0,1);
Slot sl1 = new Slot('D');
});
assertDoesNotThrow(() -> {
Slot sl1 = new Slot('E');
});
assertDoesNotThrow(() -> {
Slot sl1 = new Slot('F');
});
assertDoesNotThrow(() -> {
Slot sl1 = new Slot('G');
});
assertThrows(IllegalArgumentException.class, () -> {
Slot sl1 = new Slot('H');
});
assertThrows(IllegalArgumentException.class, () -> {
Slot sl1 = new Slot(1,0,1,1);
});
assertThrows(IllegalArgumentException.class, () -> {
Slot sl1 = new Slot(0,1,1,1);
});
assertThrows(IllegalArgumentException.class, () -> {
Slot sl1 = new Slot(1,1,1,1);
});
}
}