Skip to content

Commit 394cdc7

Browse files
committed
Tweaks.
1 parent a364016 commit 394cdc7

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

src/test/java/com/stringcompressor/FiveBitAsciiCompressorTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,39 @@ public class FiveBitAsciiCompressorTest extends BaseTest {
1919

2020
@Test
2121
public void validCustomCharsetTest() {
22-
byte[] customSupportedCharset = new byte[]{
22+
byte[] customCharset = new byte[]{
2323
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2424
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
25-
new FiveBitAsciiCompressor(customSupportedCharset);
25+
new FiveBitAsciiCompressor(customCharset);
2626
}
2727

2828
@Test
2929
public void excessCustomCharsetTest() {
30-
byte[] customSupportedCharset = new byte[]{
30+
byte[] customCharset = new byte[]{
3131
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
3232
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
3333
CharacterNotSupportedException e = assertThrows(
34-
CharacterNotSupportedException.class, () -> new FiveBitAsciiCompressor(customSupportedCharset));
34+
CharacterNotSupportedException.class, () -> new FiveBitAsciiCompressor(customCharset));
3535
assertEquals("5-bit compressor requires a set of exactly 32 characters. Currently 33.", e.getMessage());
3636
}
3737

3838
@Test
3939
public void missingCustomCharsetTest() {
40-
byte[] customSupportedCharset = new byte[]{
40+
byte[] customCharset = new byte[]{
4141
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
4242
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
4343
CharacterNotSupportedException e = assertThrows(
44-
CharacterNotSupportedException.class, () -> new FiveBitAsciiCompressor(customSupportedCharset));
44+
CharacterNotSupportedException.class, () -> new FiveBitAsciiCompressor(customCharset));
4545
assertEquals("5-bit compressor requires a set of exactly 32 characters. Currently 31.", e.getMessage());
4646
}
4747

4848
@Test
4949
public void invalidCustomCharsetTest() {
50-
byte[] customSupportedCharset = new byte[]{
50+
byte[] customCharset = new byte[]{
5151
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
5252
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
5353
CharacterNotSupportedException e = assertThrows(
54-
CharacterNotSupportedException.class, () -> new FiveBitAsciiCompressor(customSupportedCharset));
54+
CharacterNotSupportedException.class, () -> new FiveBitAsciiCompressor(customCharset));
5555
assertEquals("Invalid character found in the custom supported charset: '\uFFFF' (code point -1)", e.getMessage());
5656
}
5757

src/test/java/com/stringcompressor/FourBitAsciiCompressorTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,31 @@ public class FourBitAsciiCompressorTest extends BaseTest {
1919

2020
@Test
2121
public void validCustomCharsetTest() {
22-
byte[] customSupportedCharset = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
23-
new FourBitAsciiCompressor(customSupportedCharset);
22+
byte[] customCharset = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
23+
new FourBitAsciiCompressor(customCharset);
2424
}
2525

2626
@Test
2727
public void excessCustomCharsetTest() {
28-
byte[] customSupportedCharset = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
28+
byte[] customCharset = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
2929
CharacterNotSupportedException e = assertThrows(
30-
CharacterNotSupportedException.class, () -> new FourBitAsciiCompressor(customSupportedCharset));
30+
CharacterNotSupportedException.class, () -> new FourBitAsciiCompressor(customCharset));
3131
assertEquals("4-bit compressor requires a set of exactly 16 characters. Currently 17.", e.getMessage());
3232
}
3333

3434
@Test
3535
public void missingCustomCharsetTest() {
36-
byte[] customSupportedCharset = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
36+
byte[] customCharset = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
3737
CharacterNotSupportedException e = assertThrows(
38-
CharacterNotSupportedException.class, () -> new FourBitAsciiCompressor(customSupportedCharset));
38+
CharacterNotSupportedException.class, () -> new FourBitAsciiCompressor(customCharset));
3939
assertEquals("4-bit compressor requires a set of exactly 16 characters. Currently 15.", e.getMessage());
4040
}
4141

4242
@Test
4343
public void invalidCustomCharsetTest() {
44-
byte[] customSupportedCharset = new byte[]{-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
44+
byte[] customCharset = new byte[]{-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
4545
CharacterNotSupportedException e = assertThrows(
46-
CharacterNotSupportedException.class, () -> new FourBitAsciiCompressor(customSupportedCharset));
46+
CharacterNotSupportedException.class, () -> new FourBitAsciiCompressor(customCharset));
4747
assertEquals("Invalid character found in the custom supported charset: '\uFFFF' (code point -1)", e.getMessage());
4848
}
4949

src/test/java/com/stringcompressor/SixBitAsciiCompressorTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,39 @@ public class SixBitAsciiCompressorTest extends BaseTest {
1919

2020
@Test
2121
public void validCustomCharsetTest() {
22-
byte[] customSupportedCharset = new byte[]{
22+
byte[] customCharset = new byte[]{
2323
0, 1, 2, 3, 4, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 26, 27, 28, 29, 30, 31,
2424
32, 33, 34, 36, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 56, 57, 58, 59, 60, 61, 62, 63};
25-
new SixBitAsciiCompressor(customSupportedCharset);
25+
new SixBitAsciiCompressor(customCharset);
2626
}
2727

2828
@Test
2929
public void excessCustomCharsetTest() {
30-
byte[] customSupportedCharset = new byte[]{
30+
byte[] customCharset = new byte[]{
3131
0, 1, 2, 3, 4, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 26, 27, 28, 29, 30, 31,
3232
32, 33, 34, 36, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64};
3333
CharacterNotSupportedException e = assertThrows(
34-
CharacterNotSupportedException.class, () -> new SixBitAsciiCompressor(customSupportedCharset));
34+
CharacterNotSupportedException.class, () -> new SixBitAsciiCompressor(customCharset));
3535
assertEquals("6-bit compressor requires a set of exactly 64 characters. Currently 65.", e.getMessage());
3636
}
3737

3838
@Test
3939
public void missingCustomCharsetTest() {
40-
byte[] customSupportedCharset = new byte[]{
40+
byte[] customCharset = new byte[]{
4141
0, 1, 2, 3, 4, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 26, 27, 28, 29, 30, 31,
4242
32, 33, 34, 36, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 56, 57, 58, 59, 60, 61, 62};
4343
CharacterNotSupportedException e = assertThrows(
44-
CharacterNotSupportedException.class, () -> new SixBitAsciiCompressor(customSupportedCharset));
44+
CharacterNotSupportedException.class, () -> new SixBitAsciiCompressor(customCharset));
4545
assertEquals("6-bit compressor requires a set of exactly 64 characters. Currently 63.", e.getMessage());
4646
}
4747

4848
@Test
4949
public void invalidCustomCharsetTest() {
50-
byte[] customSupportedCharset = new byte[]{
50+
byte[] customCharset = new byte[]{
5151
-1, 0, 1, 2, 3, 4, 6, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 26, 27, 28, 29, 30, 31,
5252
32, 33, 34, 36, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 56, 57, 58, 59, 60, 61, 62};
5353
CharacterNotSupportedException e = assertThrows(
54-
CharacterNotSupportedException.class, () -> new SixBitAsciiCompressor(customSupportedCharset));
54+
CharacterNotSupportedException.class, () -> new SixBitAsciiCompressor(customCharset));
5555
assertEquals("Invalid character found in the custom supported charset: '\uFFFF' (code point -1)", e.getMessage());
5656
}
5757

0 commit comments

Comments
 (0)