diff --git a/src/main/java/solitaer/AblageStack.java b/src/main/java/solitaer/AblageStack.java new file mode 100644 index 0000000..7cb9fbe --- /dev/null +++ b/src/main/java/solitaer/AblageStack.java @@ -0,0 +1,21 @@ +package solitaer; + +public class AblageStack extends BaseStack { + + private static final long serialVersionUID = 1L; + + public AblageStack(int _x, int _y) { + super(); + super.setLocation(_x, _y); + super.setSize(IMAGE_WIDTH, STACK_HIGHT); + super.setOpaque(false); + super.setLayout(null); + } + + @Override + protected boolean cardCheck(Card _topStack, Card _playerCard) { + // TODO Auto-generated method stub + return true; + } + +} diff --git a/src/test/java/solitaer/AblageStackTest.java b/src/test/java/solitaer/AblageStackTest.java new file mode 100644 index 0000000..4a9283e --- /dev/null +++ b/src/test/java/solitaer/AblageStackTest.java @@ -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 testAblageStackTestDaten(){ + return Stream.of( + Arguments.of("Ass-Kreuz auf Leeres Feld", + null, + new Card(1, Symbol.Kreuz, true), true) + ); + } + +}