Browse Source

Test.CardsGetValue

main
fdai7920 11 months ago
parent
commit
7e750cd942
  1. 3
      src/main/java/de/hsfulda/onses/models/Cards.java
  2. 16
      src/test/java/de/hsfulda/onses/CardsTest.java

3
src/main/java/de/hsfulda/onses/models/Cards.java

@ -41,4 +41,7 @@ public class Cards {
return this.color; return this.color;
} }
public evalue getValue() {
return this.value;
}
} }

16
src/test/java/de/hsfulda/onses/CardsTest.java

@ -24,6 +24,7 @@ public class CardsTest {
assertEquals(112, testcard.getId()); assertEquals(112, testcard.getId());
} }
@Test @Test
@DisplayName("CardGetColorBlue") @DisplayName("CardGetColorBlue")
public void CardTestGetColorBlue() { 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());
}
} }
Loading…
Cancel
Save