|
@ -0,0 +1,28 @@ |
|
|
|
|
|
package solitaer; |
|
|
|
|
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.stream.Stream; |
|
|
|
|
|
|
|
|
|
|
|
import org.junit.jupiter.params.ParameterizedTest; |
|
|
|
|
|
import org.junit.jupiter.params.provider.Arguments; |
|
|
|
|
|
import org.junit.jupiter.params.provider.MethodSource; |
|
|
|
|
|
|
|
|
|
|
|
class AblageStackTest { |
|
|
|
|
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
|
|
@MethodSource("testAblageStackTestDaten") |
|
|
|
|
|
void testRulesetStartStack(String msg, Card _stapel, Card _spieler, boolean _expectedResult) { |
|
|
|
|
|
AblageStack stack = new AblageStack(0, 0); |
|
|
|
|
|
assertEquals(_expectedResult, stack.cardCheck(_stapel, _spieler), msg); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static Stream<Arguments> testAblageStackTestDaten(){ |
|
|
|
|
|
return Stream.of( |
|
|
|
|
|
Arguments.of("Ass-Kreuz auf Leeres Feld", |
|
|
|
|
|
null, |
|
|
|
|
|
new Card(1, Symbol.Kreuz, true), true) |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |