Skip to content

Commit ce025aa

Browse files
Updating Imports, readability improvements.
Pull request feedback. Using static Assert imports for consistency within this effort. Altering whitespace for better readability in parameter construction.
1 parent e5b7c0d commit ce025aa

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/test/java/org/owasp/esapi/codecs/percent/PercentCodecCharacterTest.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414

1515
package org.owasp.esapi.codecs.percent;
1616

17+
import static org.junit.Assert.assertEquals;
18+
import static org.junit.Assert.assertTrue;
1719
import static org.owasp.esapi.codecs.percent.PercentCodecStringTest.PERCENT_CODEC_IMMUNE;
1820

1921
import java.util.ArrayList;
2022
import java.util.Collection;
2123

22-
import org.junit.Assert;
2324
import org.junit.Test;
2425
import org.junit.runners.Parameterized.Parameters;
2526
import org.owasp.esapi.codecs.PercentCodec;
@@ -34,8 +35,8 @@ public class PercentCodecCharacterTest extends AbstractCodecCharacterTest {
3435
@Parameters(name = "{0}")
3536
public static Collection<Object[]> buildTests() {
3637
Collection<Object[]> tests = new ArrayList<>();
37-
3838
Collection<CodecCharacterTestTuple> tuples = new ArrayList<>();
39+
3940
tuples.add(newTuple("%3C", Character.valueOf('<')));
4041

4142
tuples.add(newTuple("%00", Character.MIN_VALUE));
@@ -88,8 +89,8 @@ public void testDecodePushbackSequence() {
8889
private void assertInputIsDecodedToValue() {
8990
PushbackString pbs = new PushbackString(input);
9091
int startIndex = pbs.index();
91-
Assert.assertEquals(decodedValue, codec.decodeCharacter(pbs));
92-
Assert.assertTrue(startIndex < pbs.index());
92+
assertEquals(decodedValue, codec.decodeCharacter(pbs));
93+
assertTrue(startIndex < pbs.index());
9394
}
9495

9596
/**
@@ -100,8 +101,8 @@ private void assertInputIsDecodedToValue() {
100101
private void assertInputIsDecodedToNull() {
101102
PushbackString pbs = new PushbackString(input);
102103
int startIndex = pbs.index();
103-
Assert.assertEquals(null, codec.decodeCharacter(pbs));
104-
Assert.assertEquals(startIndex, pbs.index());
104+
assertEquals(null, codec.decodeCharacter(pbs));
105+
assertEquals(startIndex, pbs.index());
105106
}
106107

107108
}

0 commit comments

Comments
 (0)