|
@ -17,7 +17,7 @@ public class CardTest { |
|
|
int expected = 5; |
|
|
int expected = 5; |
|
|
int ID = 5; |
|
|
int ID = 5; |
|
|
// act |
|
|
// act |
|
|
Card testcard = new Card().setId(ID).setColor(Card.Color.BLACK).setValue(Card.evalue.FIVE); |
|
|
|
|
|
|
|
|
Card testcard = new Card().setId(ID).setColor(Card.Color.BLACK).setValue(Card.Value.FIVE); |
|
|
int answer = testcard.getId(); |
|
|
int answer = testcard.getId(); |
|
|
// assert |
|
|
// assert |
|
|
assertEquals(expected, answer); |
|
|
assertEquals(expected, answer); |
|
@ -31,7 +31,7 @@ public class CardTest { |
|
|
int expected = 112; |
|
|
int expected = 112; |
|
|
int ID = 112; |
|
|
int ID = 112; |
|
|
// act |
|
|
// act |
|
|
Card testcard = new Card().setId(ID).setColor(Card.Color.BLUE).setValue(Card.evalue.CHOOSEDRAW); |
|
|
|
|
|
|
|
|
Card testcard = new Card().setId(ID).setColor(Card.Color.BLUE).setValue(Card.Value.CHOOSEDRAW); |
|
|
int answer = testcard.getId(); |
|
|
int answer = testcard.getId(); |
|
|
// assert |
|
|
// assert |
|
|
assertEquals(expected, answer); |
|
|
assertEquals(expected, answer); |
|
@ -46,7 +46,7 @@ public class CardTest { |
|
|
Card.Color expected = Card.Color.BLUE; |
|
|
Card.Color expected = Card.Color.BLUE; |
|
|
Card.Color color = Card.Color.BLUE; |
|
|
Card.Color color = Card.Color.BLUE; |
|
|
// act |
|
|
// act |
|
|
Card testcard = new Card().setId(9).setColor(color).setValue(Card.evalue.FIVE); |
|
|
|
|
|
|
|
|
Card testcard = new Card().setId(9).setColor(color).setValue(Card.Value.FIVE); |
|
|
Card.Color answer = testcard.getColor(); |
|
|
Card.Color answer = testcard.getColor(); |
|
|
// assert |
|
|
// assert |
|
|
assertEquals(expected, answer); |
|
|
assertEquals(expected, answer); |
|
@ -59,7 +59,7 @@ public class CardTest { |
|
|
Card.Color expected = Card.Color.BLACK; |
|
|
Card.Color expected = Card.Color.BLACK; |
|
|
Card.Color color = Card.Color.BLACK; |
|
|
Card.Color color = Card.Color.BLACK; |
|
|
// act |
|
|
// act |
|
|
Card testcard = new Card().setId(15).setColor(color).setValue(Card.evalue.CHOOSE); |
|
|
|
|
|
|
|
|
Card testcard = new Card().setId(15).setColor(color).setValue(Card.Value.CHOOSE); |
|
|
Card.Color answer = testcard.getColor(); |
|
|
Card.Color answer = testcard.getColor(); |
|
|
// assert |
|
|
// assert |
|
|
assertEquals(expected, answer); |
|
|
assertEquals(expected, answer); |
|
@ -71,11 +71,11 @@ public class CardTest { |
|
|
public void CardTestGetValueThree() { |
|
|
public void CardTestGetValueThree() { |
|
|
|
|
|
|
|
|
// arrange |
|
|
// arrange |
|
|
Card.evalue expected = Card.evalue.THREE; |
|
|
|
|
|
Card.evalue value = Card.evalue.THREE; |
|
|
|
|
|
|
|
|
Card.Value expected = Card.Value.THREE; |
|
|
|
|
|
Card.Value value = Card.Value.THREE; |
|
|
// act |
|
|
// act |
|
|
Card testcard = new Card().setId(2).setColor(Card.Color.BLUE).setValue(value); |
|
|
Card testcard = new Card().setId(2).setColor(Card.Color.BLUE).setValue(value); |
|
|
Card.evalue answer = testcard.getValue(); |
|
|
|
|
|
|
|
|
Card.Value answer = testcard.getValue(); |
|
|
// assert |
|
|
// assert |
|
|
assertEquals(expected, answer); |
|
|
assertEquals(expected, answer); |
|
|
} |
|
|
} |
|
@ -84,11 +84,11 @@ public class CardTest { |
|
|
public void CardTestGetValueSkip() { |
|
|
public void CardTestGetValueSkip() { |
|
|
|
|
|
|
|
|
// arrange |
|
|
// arrange |
|
|
Card.evalue expected = Card.evalue.SKIP; |
|
|
|
|
|
Card.evalue value = Card.evalue.SKIP; |
|
|
|
|
|
|
|
|
Card.Value expected = Card.Value.SKIP; |
|
|
|
|
|
Card.Value value = Card.Value.SKIP; |
|
|
// act |
|
|
// act |
|
|
Card testcard = new Card().setId(19).setColor(Card.Color.BLACK).setValue(value); |
|
|
Card testcard = new Card().setId(19).setColor(Card.Color.BLACK).setValue(value); |
|
|
Card.evalue answer = testcard.getValue(); |
|
|
|
|
|
|
|
|
Card.Value answer = testcard.getValue(); |
|
|
// assert |
|
|
// assert |
|
|
assertEquals(expected, answer); |
|
|
assertEquals(expected, answer); |
|
|
} |
|
|
} |
|
|