|
@ -24,12 +24,13 @@ class CardDeckTest { |
|
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
@ParameterizedTest |
|
|
@MethodSource("testSymbole") |
|
|
@MethodSource("testSymbole") |
|
|
|
|
|
//Jedes Symbol muss einmal vorhand sein |
|
|
void testCardDeckSymbole(String msg, Symbol _sym) { |
|
|
void testCardDeckSymbole(String msg, Symbol _sym) { |
|
|
|
|
|
|
|
|
boolean result = false; |
|
|
boolean result = false; |
|
|
|
|
|
|
|
|
for(int i = 0; i<deck.getDeck().size(); i++) { |
|
|
|
|
|
if(deck.getDeck().get(i).getSymbol() == _sym) { |
|
|
|
|
|
|
|
|
for(int allCardZähler = 0; allCardZähler<deck.getDeck().size(); allCardZähler++) { |
|
|
|
|
|
if(deck.getDeck().get(allCardZähler).getSymbol() == _sym) { |
|
|
result = true; |
|
|
result = true; |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
@ -51,6 +52,7 @@ class CardDeckTest { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
|
|
|
//Jedes Symbol muss 13 mal vorrhanden sein |
|
|
void testCardDeckNumber() { |
|
|
void testCardDeckNumber() { |
|
|
|
|
|
|
|
|
boolean result = true; |
|
|
boolean result = true; |
|
@ -66,8 +68,8 @@ class CardDeckTest { |
|
|
|
|
|
|
|
|
private boolean CheckAllCards(Symbol _sym) { |
|
|
private boolean CheckAllCards(Symbol _sym) { |
|
|
boolean result = true; |
|
|
boolean result = true; |
|
|
for(int i =1; i<=13; i++) { |
|
|
|
|
|
if(deck.getDeck().contains(new Card(i, _sym, false))== false) { |
|
|
|
|
|
|
|
|
for(int nrZähler =1; nrZähler<=13; nrZähler++) { |
|
|
|
|
|
if(deck.getDeck().contains(new Card(nrZähler, _sym, false))== false) { |
|
|
result = false; |
|
|
result = false; |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|