|
@@ -14,8 +14,6 @@ public class DeckTest {
|
14
|
14
|
/**
|
15
|
15
|
* The test class DieTest.
|
16
|
16
|
*/
|
17
|
|
-
|
18
|
|
- private Card card;
|
19
|
17
|
private Deck deck;
|
20
|
18
|
|
21
|
19
|
/**
|
|
@@ -40,7 +38,7 @@ public class DeckTest {
|
40
|
38
|
|
41
|
39
|
|
42
|
40
|
//When
|
43
|
|
- Object card = deck.draw();
|
|
41
|
+ Card card = deck.draw();
|
44
|
42
|
Card ten = new Card(Rank.TEN, Suit.SPADES);
|
45
|
43
|
//Result
|
46
|
44
|
|
|
@@ -49,14 +47,14 @@ public class DeckTest {
|
49
|
47
|
}
|
50
|
48
|
|
51
|
49
|
@Test
|
52
|
|
- public void removeTest() {
|
53
|
|
-
|
|
50
|
+ public void removalTest() {
|
54
|
51
|
|
|
52
|
+ Deck deck = new Deck();
|
55
|
53
|
//When
|
56
|
|
-
|
|
54
|
+ Card result = deck.draw();
|
57
|
55
|
//Result
|
58
|
|
-
|
59
|
|
-
|
|
56
|
+ int cardsRemaining = deck.size();
|
|
57
|
+ assertEquals(result, cardsRemaining);
|
60
|
58
|
|
61
|
59
|
|
62
|
60
|
}
|