Skip to content

Commit 29a7738

Browse files
committed
fix according to POLICIES.doc
1 parent 6b6e207 commit 29a7738

2 files changed

Lines changed: 19 additions & 29 deletions

File tree

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
1-
import java.util.List;
2-
31
public class Poker {
4-
5-
Poker(List<String> hands) {
6-
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
7-
}
8-
9-
List<String> bestHands() {
10-
throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
11-
}
122
}

‎exercises/poker/src/test/java/PokerTest.java‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import org.junit.Test;
66

7-
import jdk.nashorn.internal.ir.annotations.Ignore;
7+
import org.junit.Ignore;
88

99
public class PokerTest {
1010
@Test
@@ -14,63 +14,63 @@ public void oneHand() {
1414
}
1515

1616
@Test
17-
@Ignore
17+
@Ignore("Remove to run test")
1818
public void nothingVsOnePair() {
1919
final String nothing = "4S 5H 6S 8D JH";
2020
final String pairOf4 = "2S 4H 6S 4D JH";
2121
assertEquals(Arrays.asList(pairOf4),new Poker(Arrays.asList(nothing, pairOf4)).getBestHands());
2222
}
2323

2424
@Test
25-
@Ignore
25+
@Ignore("Remove to run test")
2626
public void twoPairs() {
2727
final String pairOf2 = "4S 2H 6S 2D JH";
2828
final String pairOf4 = "2S 4H 6S 4D JH";
2929
assertEquals(Arrays.asList(pairOf4), new Poker(Arrays.asList(pairOf2,pairOf4)).getBestHands());
3030
}
3131

3232
@Test
33-
@Ignore
33+
@Ignore("Remove to run test")
3434
public void onePairVsDoublePair() {
3535
final String pairOf8 = "2S 8H 6S 8D JH";
3636
final String doublePair = "4S 5H 4S 8D 5H";
3737
assertEquals(Arrays.asList(doublePair), new Poker(Arrays.asList(pairOf8, doublePair)).getBestHands());
3838
}
3939

4040
@Test
41-
@Ignore
41+
@Ignore("Remove to run test")
4242
public void twoDoublePairs() {
4343
final String doublePair2And8 = "2S 8H 2S 8D JH";
4444
final String doublePair4And5 = "4S 5H 4S 8D 5H";
4545
assertEquals(Arrays.asList(doublePair2And8), new Poker(Arrays.asList(doublePair2And8, doublePair4And5)).getBestHands());
4646
}
4747

4848
@Test
49-
@Ignore
49+
@Ignore("Remove to run test")
5050
public void doublePairVsThree() {
5151
final String doublePair2And8 = "2S 8H 2S 8D JH";
5252
final String threeOf4 = "4S 5H 4S 8D 4H";
5353
assertEquals(Arrays.asList(threeOf4 ), new Poker(Arrays.asList(doublePair2And8, threeOf4)).getBestHands());
5454
}
5555

5656
@Test
57-
@Ignore
57+
@Ignore("Remove to run test")
5858
public void twoThrees() {
5959
final String threeOf2 = "2S 2H 2S 8D JH";
6060
final String threeOf1 = "4S AH AS 8D AH";
6161
assertEquals(Arrays.asList(threeOf1), new Poker(Arrays.asList(threeOf2, threeOf1)).getBestHands());
6262
}
6363

6464
@Test
65-
@Ignore
65+
@Ignore("Remove to run test")
6666
public void threeVsStraight() {
6767
final String threeOf4 = "4S 5H 4S 8D 4H";
6868
final String straight = "3S 4H 2S 6D 5H";
6969
assertEquals(Arrays.asList(straight), new Poker(Arrays.asList(threeOf4, straight)).getBestHands());
7070
}
7171

7272
@Test
73-
@Ignore
73+
@Ignore("Remove to run test")
7474
public void twoStraights() {
7575
final String straightTo8 = "4S 6H 7S 8D 5H";
7676
final String straightTo9 = "5S 7H 8S 9D 6H";
@@ -82,71 +82,71 @@ public void twoStraights() {
8282
}
8383

8484
@Test
85-
@Ignore
85+
@Ignore("Remove to run test")
8686
public void straightVsFlush() {
8787
final String straightTo8 = "4S 6H 7S 8D 5H";
8888
final String flushTo7 = "2S 4S 5S 6S 7S";
8989
assertEquals(Arrays.asList(flushTo7 ), new Poker(Arrays.asList(straightTo8, flushTo7)).getBestHands());
9090
}
9191

9292
@Test
93-
@Ignore
93+
@Ignore("Remove to run test")
9494
public void twoFlushes() {
9595
final String flushTo8 = "3H 6H 7H 8H 5H";
9696
final String flushTo7 = "2S 4S 5S 6S 7S";
9797
assertEquals(Arrays.asList(flushTo8), new Poker(Arrays.asList(flushTo8, flushTo7)).getBestHands());
9898
}
9999

100100
@Test
101-
@Ignore
101+
@Ignore("Remove to run test")
102102
public void flushVsFull() {
103103
final String flushTo8 = "3H 6H 7H 8H 5H";
104104
final String full = "4S 5H 4S 5D 4H";
105105
assertEquals(Arrays.asList(full ), new Poker(Arrays.asList(full, flushTo8)).getBestHands());
106106
}
107107

108108
@Test
109-
@Ignore
109+
@Ignore("Remove to run test")
110110
public void twoFulls() {
111111
final String fullOf4By9 = "4H 4S 4D 9S 9D";
112112
final String fullOf5By8 = "5H 5S 5D 8S 8D";
113113
assertEquals(Arrays.asList(fullOf5By8 ), new Poker(Arrays.asList(fullOf4By9, fullOf5By8)).getBestHands());
114114
}
115115

116116
@Test
117-
@Ignore
117+
@Ignore("Remove to run test")
118118
public void fullVsSquare() {
119119
final String full = "4S 5H 4S 5D 4H";
120120
final String squareOf3 = "3S 3H 2S 3D 3H";
121121
assertEquals(Arrays.asList(squareOf3 ), new Poker(Arrays.asList(full, squareOf3)).getBestHands());
122122
}
123123

124124
@Test
125-
@Ignore
125+
@Ignore("Remove to run test")
126126
public void twoSquares() {
127127
final String squareOf2 = "2S 2H 2S 8D 2H";
128128
final String squareOf5 = "4S 5H 5S 5D 5H";
129129
assertEquals(Arrays.asList(squareOf5), new Poker(Arrays.asList(squareOf2, squareOf5)).getBestHands());
130130
}
131131

132132
@Test
133-
@Ignore
133+
@Ignore("Remove to run test")
134134
public void squareVsStraightFlush() {
135135
final String squareOf5 = "4S 5H 5S 5D 5H";
136136
final String straightFlushTo9 = "5S 7S 8S 9S 6S";
137137
assertEquals(Arrays.asList(straightFlushTo9 ), new Poker(Arrays.asList(squareOf5, straightFlushTo9)).getBestHands());
138138
}
139139

140140
@Test
141-
@Ignore
141+
@Ignore("Remove to run test")
142142
public void twoStraightFlushes() {
143143
final String straightFlushTo8 = "4H 6H 7H 8H 5H";
144144
final String straightFlushTo9 = "5S 7S 8S 9S 6S";
145145
assertEquals(Arrays.asList(straightFlushTo9 ), new Poker(Arrays.asList(straightFlushTo8, straightFlushTo9)).getBestHands());
146146
}
147147

148148
@Test
149-
@Ignore
149+
@Ignore("Remove to run test")
150150
public void threeHandWithTie() {
151151
final String spadeStraightTo9 = "9S 8S 7S 6S 5S";
152152
final String diamondStraightTo9 = "9D 8D 7D 6D 5D";
@@ -155,7 +155,7 @@ public void threeHandWithTie() {
155155
}
156156

157157
@Test
158-
@Ignore
158+
@Ignore("Remove to run test")
159159
public void straightTo5AgainstAPairOfJacks() {
160160
final String straightTo5 = "2S 4D 5C 3S AS";
161161
final String twoJacks = "JD 8D 7D JC 5D";

0 commit comments

Comments
 (0)