Add: Decks Create Slots
This commit is contained in:
@@ -11,11 +11,11 @@ class DecksCreatorTest {
|
||||
|
||||
@Test
|
||||
void loadDeck() {
|
||||
List<TribeCard> cards = DecksCreator.loadDeck("/Cards/cards_era1.json");
|
||||
List<TribeCard> cards = DecksCreator.loadTribeDeck("/Cards/tribe_era1.json");
|
||||
assertEquals(33,cards.size());
|
||||
List<TribeCard> cards2 = DecksCreator.loadDeck("/Cards/cards_era2.json");
|
||||
List<TribeCard> cards2 = DecksCreator.loadTribeDeck("/Cards/tribe_era2.json");
|
||||
assertEquals(32,cards2.size());
|
||||
List<TribeCard> cards3 = DecksCreator.loadDeck("/Cards/cards_era3.json");
|
||||
List<TribeCard> cards3 = DecksCreator.loadTribeDeck("/Cards/tribe_era3.json");
|
||||
assertEquals(29,cards3.size());
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user