Skip to content

Commit 93f538e

Browse files
miranikaran01sjwarner-bp
authored andcommitted
Removed final from tests (exercism#1435)
1 parent 33c2d1c commit 93f538e

1 file changed

Lines changed: 39 additions & 39 deletions

File tree

‎exercises/all-your-base/src/test/java/BaseConverterTest.java‎

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public class BaseConverterTest {
1414

1515
@Test
1616
public void testSingleBitOneToDecimal() {
17-
final BaseConverter baseConverter = new BaseConverter(2, new int[]{1});
17+
BaseConverter baseConverter = new BaseConverter(2, new int[]{1});
1818

19-
final int[] expectedDigits = new int[]{1};
20-
final int[] actualDigits = baseConverter.convertToBase(10);
19+
int[] expectedDigits = new int[]{1};
20+
int[] actualDigits = baseConverter.convertToBase(10);
2121

2222
assertArrayEquals(
2323
String.format(
@@ -31,10 +31,10 @@ public void testSingleBitOneToDecimal() {
3131
@Ignore("Remove to run test")
3232
@Test
3333
public void testBinaryToSingleDecimal() {
34-
final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1});
34+
BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1});
3535

36-
final int[] expectedDigits = new int[]{5};
37-
final int[] actualDigits = baseConverter.convertToBase(10);
36+
int[] expectedDigits = new int[]{5};
37+
int[] actualDigits = baseConverter.convertToBase(10);
3838

3939
assertArrayEquals(
4040
String.format(
@@ -48,10 +48,10 @@ public void testBinaryToSingleDecimal() {
4848
@Ignore("Remove to run test")
4949
@Test
5050
public void testSingleDecimalToBinary() {
51-
final BaseConverter baseConverter = new BaseConverter(10, new int[]{5});
51+
BaseConverter baseConverter = new BaseConverter(10, new int[]{5});
5252

53-
final int[] expectedDigits = new int[]{1, 0, 1};
54-
final int[] actualDigits = baseConverter.convertToBase(2);
53+
int[] expectedDigits = new int[]{1, 0, 1};
54+
int[] actualDigits = baseConverter.convertToBase(2);
5555

5656
assertArrayEquals(
5757
String.format(
@@ -65,10 +65,10 @@ public void testSingleDecimalToBinary() {
6565
@Ignore("Remove to run test")
6666
@Test
6767
public void testBinaryToMultipleDecimal() {
68-
final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
68+
BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
6969

70-
final int[] expectedDigits = new int[]{4, 2};
71-
final int[] actualDigits = baseConverter.convertToBase(10);
70+
int[] expectedDigits = new int[]{4, 2};
71+
int[] actualDigits = baseConverter.convertToBase(10);
7272

7373
assertArrayEquals(
7474
String.format(
@@ -82,10 +82,10 @@ public void testBinaryToMultipleDecimal() {
8282
@Ignore("Remove to run test")
8383
@Test
8484
public void testDecimalToBinary() {
85-
final BaseConverter baseConverter = new BaseConverter(10, new int[]{4, 2});
85+
BaseConverter baseConverter = new BaseConverter(10, new int[]{4, 2});
8686

87-
final int[] expectedDigits = new int[]{1, 0, 1, 0, 1, 0};
88-
final int[] actualDigits = baseConverter.convertToBase(2);
87+
int[] expectedDigits = new int[]{1, 0, 1, 0, 1, 0};
88+
int[] actualDigits = baseConverter.convertToBase(2);
8989

9090
assertArrayEquals(
9191
String.format(
@@ -99,10 +99,10 @@ public void testDecimalToBinary() {
9999
@Ignore("Remove to run test")
100100
@Test
101101
public void testTrinaryToHexadecimal() {
102-
final BaseConverter baseConverter = new BaseConverter(3, new int[]{1, 1, 2, 0});
102+
BaseConverter baseConverter = new BaseConverter(3, new int[]{1, 1, 2, 0});
103103

104-
final int[] expectedDigits = new int[]{2, 10};
105-
final int[] actualDigits = baseConverter.convertToBase(16);
104+
int[] expectedDigits = new int[]{2, 10};
105+
int[] actualDigits = baseConverter.convertToBase(16);
106106

107107
assertArrayEquals(
108108
String.format(
@@ -116,10 +116,10 @@ public void testTrinaryToHexadecimal() {
116116
@Ignore("Remove to run test")
117117
@Test
118118
public void testHexadecimalToTrinary() {
119-
final BaseConverter baseConverter = new BaseConverter(16, new int[]{2, 10});
119+
BaseConverter baseConverter = new BaseConverter(16, new int[]{2, 10});
120120

121-
final int[] expectedDigits = new int[]{1, 1, 2, 0};
122-
final int[] actualDigits = baseConverter.convertToBase(3);
121+
int[] expectedDigits = new int[]{1, 1, 2, 0};
122+
int[] actualDigits = baseConverter.convertToBase(3);
123123

124124
assertArrayEquals(
125125
String.format(
@@ -133,10 +133,10 @@ public void testHexadecimalToTrinary() {
133133
@Ignore("Remove to run test")
134134
@Test
135135
public void test15BitInteger() {
136-
final BaseConverter baseConverter = new BaseConverter(97, new int[]{3, 46, 60});
136+
BaseConverter baseConverter = new BaseConverter(97, new int[]{3, 46, 60});
137137

138-
final int[] expectedDigits = new int[]{6, 10, 45};
139-
final int[] actualDigits = baseConverter.convertToBase(73);
138+
int[] expectedDigits = new int[]{6, 10, 45};
139+
int[] actualDigits = baseConverter.convertToBase(73);
140140

141141
assertArrayEquals(
142142
String.format(
@@ -150,10 +150,10 @@ public void test15BitInteger() {
150150
@Ignore("Remove to run test")
151151
@Test
152152
public void testEmptyDigits() {
153-
final BaseConverter baseConverter = new BaseConverter(2, new int[]{});
153+
BaseConverter baseConverter = new BaseConverter(2, new int[]{});
154154

155-
final int[] expectedDigits = new int[]{0};
156-
final int[] actualDigits = baseConverter.convertToBase(10);
155+
int[] expectedDigits = new int[]{0};
156+
int[] actualDigits = baseConverter.convertToBase(10);
157157

158158
assertArrayEquals(
159159
String.format(
@@ -167,10 +167,10 @@ public void testEmptyDigits() {
167167
@Ignore("Remove to run test")
168168
@Test
169169
public void testSingleZero() {
170-
final BaseConverter baseConverter = new BaseConverter(10, new int[]{0});
170+
BaseConverter baseConverter = new BaseConverter(10, new int[]{0});
171171

172-
final int[] expectedDigits = new int[]{0};
173-
final int[] actualDigits = baseConverter.convertToBase(2);
172+
int[] expectedDigits = new int[]{0};
173+
int[] actualDigits = baseConverter.convertToBase(2);
174174

175175
assertArrayEquals(
176176
String.format(
@@ -184,10 +184,10 @@ public void testSingleZero() {
184184
@Ignore("Remove to run test")
185185
@Test
186186
public void testMultipleZeros() {
187-
final BaseConverter baseConverter = new BaseConverter(10, new int[]{0, 0, 0});
187+
BaseConverter baseConverter = new BaseConverter(10, new int[]{0, 0, 0});
188188

189-
final int[] expectedDigits = new int[]{0};
190-
final int[] actualDigits = baseConverter.convertToBase(2);
189+
int[] expectedDigits = new int[]{0};
190+
int[] actualDigits = baseConverter.convertToBase(2);
191191

192192
assertArrayEquals(
193193
String.format(
@@ -201,10 +201,10 @@ public void testMultipleZeros() {
201201
@Ignore("Remove to run test")
202202
@Test
203203
public void testLeadingZeros() {
204-
final BaseConverter baseConverter = new BaseConverter(7, new int[]{0, 6, 0});
204+
BaseConverter baseConverter = new BaseConverter(7, new int[]{0, 6, 0});
205205

206-
final int[] expectedDigits = new int[]{4, 2};
207-
final int[] actualDigits = baseConverter.convertToBase(10);
206+
int[] expectedDigits = new int[]{4, 2};
207+
int[] actualDigits = baseConverter.convertToBase(10);
208208

209209
assertArrayEquals(
210210
String.format(
@@ -263,7 +263,7 @@ public void testInvalidPositiveDigit() {
263263
@Ignore("Remove to run test")
264264
@Test
265265
public void testSecondBaseIsOne() {
266-
final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
266+
BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
267267

268268
expectedException.expect(IllegalArgumentException.class);
269269
expectedException.expectMessage("Bases must be at least 2.");
@@ -274,7 +274,7 @@ public void testSecondBaseIsOne() {
274274
@Ignore("Remove to run test")
275275
@Test
276276
public void testSecondBaseIsZero() {
277-
final BaseConverter baseConverter = new BaseConverter(10, new int[]{7});
277+
BaseConverter baseConverter = new BaseConverter(10, new int[]{7});
278278

279279
expectedException.expect(IllegalArgumentException.class);
280280
expectedException.expectMessage("Bases must be at least 2.");
@@ -285,7 +285,7 @@ public void testSecondBaseIsZero() {
285285
@Ignore("Remove to run test")
286286
@Test
287287
public void testSecondBaseIsNegative() {
288-
final BaseConverter baseConverter = new BaseConverter(2, new int[]{1});
288+
BaseConverter baseConverter = new BaseConverter(2, new int[]{1});
289289

290290
expectedException.expect(IllegalArgumentException.class);
291291
expectedException.expectMessage("Bases must be at least 2.");

0 commit comments

Comments
 (0)