Skip to content

Commit bc4bbde

Browse files
committed
poker: remove final from tests exercism#1426
1 parent 6e542fd commit bc4bbde

1 file changed

Lines changed: 40 additions & 40 deletions

File tree

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

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,156 +8,156 @@
88
public class PokerTest {
99
@Test
1010
public void oneHand() {
11-
final String hand = "4S 5S 7H 8D JC";
11+
String hand = "4S 5S 7H 8D JC";
1212
assertEquals(Arrays.asList(hand), new Poker(Arrays.asList(hand)).getBestHands());
1313
}
1414

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

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

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

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

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

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

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

7171
@Ignore("Remove to run test")
7272
@Test
7373
public void twoStraights() {
74-
final String straightTo8 = "4S 6H 7S 8D 5H";
75-
final String straightTo9 = "5S 7H 8S 9D 6H";
74+
String straightTo8 = "4S 6H 7S 8D 5H";
75+
String straightTo9 = "5S 7H 8S 9D 6H";
7676
assertEquals(Arrays.asList(straightTo9), new Poker(Arrays.asList(straightTo8, straightTo9)).getBestHands());
7777

78-
final String straightTo1 = "AS QH KS TD JH";
79-
final String straightTo5 = "4S AH 3S 2D 5H";
78+
String straightTo1 = "AS QH KS TD JH";
79+
String straightTo5 = "4S AH 3S 2D 5H";
8080
assertEquals(Arrays.asList(straightTo1), new Poker(Arrays.asList(straightTo1, straightTo5)).getBestHands());
8181
}
8282

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

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

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

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

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

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

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

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

147147
@Ignore("Remove to run test")
148148
@Test
149149
public void threeHandWithTie() {
150-
final String spadeStraightTo9 = "9S 8S 7S 6S 5S";
151-
final String diamondStraightTo9 = "9D 8D 7D 6D 5D";
152-
final String threeOf4 = "4D 4S 4H QS KS";
150+
String spadeStraightTo9 = "9S 8S 7S 6S 5S";
151+
String diamondStraightTo9 = "9D 8D 7D 6D 5D";
152+
String threeOf4 = "4D 4S 4H QS KS";
153153
assertEquals(Arrays.asList(spadeStraightTo9, diamondStraightTo9), new Poker(Arrays.asList(spadeStraightTo9, diamondStraightTo9, threeOf4)).getBestHands());
154154
}
155155

156156
@Ignore("Remove to run test")
157157
@Test
158158
public void straightTo5AgainstAPairOfJacks() {
159-
final String straightTo5 = "2S 4D 5C 3S AS";
160-
final String twoJacks = "JD 8D 7D JC 5D";
159+
String straightTo5 = "2S 4D 5C 3S AS";
160+
String twoJacks = "JD 8D 7D JC 5D";
161161
assertEquals(Arrays.asList(straightTo5), new Poker(Arrays.asList(straightTo5, twoJacks)).getBestHands());
162162
}
163163
}

0 commit comments

Comments
 (0)