diff --git a/src/main/java/de/hsfulda/onses/models/Cards.java b/src/main/java/de/hsfulda/onses/models/Cards.java index 0326c85..d2aeb30 100644 --- a/src/main/java/de/hsfulda/onses/models/Cards.java +++ b/src/main/java/de/hsfulda/onses/models/Cards.java @@ -41,4 +41,7 @@ public class Cards { return this.color; } + public evalue getValue() { + return this.value; + } } diff --git a/src/test/java/de/hsfulda/onses/CardsTest.java b/src/test/java/de/hsfulda/onses/CardsTest.java index 4eb4bcf..eb133a2 100644 --- a/src/test/java/de/hsfulda/onses/CardsTest.java +++ b/src/test/java/de/hsfulda/onses/CardsTest.java @@ -24,6 +24,7 @@ public class CardsTest { assertEquals(112, testcard.getId()); } + @Test @DisplayName("CardGetColorBlue") public void CardTestGetColorBlue() { @@ -40,4 +41,19 @@ public class CardsTest { } + @Test + @DisplayName("CardGetValueThree") + public void CardTestGetValueThree() { + + Cards testcard = new Cards(2, Cards.ecolor.BLUE, Cards.evalue.THREE); + assertEquals(Cards.evalue.THREE, testcard.getValue()); + } + @Test + @DisplayName("CardGetValueSkip") + public void CardTestGetValueSkip() { + + Cards testcard = new Cards(19, Cards.ecolor.BLACK, Cards.evalue.SKIP); + assertEquals(Cards.evalue.SKIP, testcard.getValue()); + } + } \ No newline at end of file