File tree Expand file tree Collapse file tree 4 files changed +26
-16
lines changed
src/test/java/org/owasp/esapi/codecs Expand file tree Collapse file tree 4 files changed +26
-16
lines changed Original file line number Diff line number Diff line change 1
- package org .owasp .esapi .codecs ;
1
+ package org .owasp .esapi .codecs . abstraction ;
2
2
3
3
import static org .junit .Assert .assertEquals ;
4
4
7
7
import org .junit .Test ;
8
8
import org .junit .runner .RunWith ;
9
9
import org .junit .runners .Parameterized ;
10
+ import org .owasp .esapi .codecs .Codec ;
11
+ import org .owasp .esapi .codecs .PushbackString ;
10
12
11
13
12
14
/**
@@ -23,17 +25,19 @@ public abstract class AbstractCodecCharacterTest {
23
25
/** Test Data Tuple.*/
24
26
protected static class CodecCharacterTestTuple {
25
27
/** Codec reference to be tested.*/
26
- Codec codec ;
28
+ public Codec codec ;
27
29
/** Set of characters that should be considered 'immune' from decoding processes.*/
28
- char [] encodeImmune ;
30
+ public char [] encodeImmune ;
29
31
/** A String representing a single encoded character.*/
30
- String input ;
32
+ public String input ;
31
33
/** The single character that input represents.*/
32
- Character decodedValue ;
34
+ public Character decodedValue ;
33
35
/** Optional field to override the toString value of this tuple. */
34
- String description ;
35
- /** {@inheritDoc}*/
36
+ public String description ;
36
37
38
+ /**Default public constructor.*/
39
+ public CodecCharacterTestTuple () { /* No Op*/ }
40
+ /** {@inheritDoc}*/
37
41
@ Override
38
42
public String toString () {
39
43
return description != null ? description : codec .getClass ().getSimpleName () + " " +input ;
Original file line number Diff line number Diff line change 1
- package org .owasp .esapi .codecs ;
1
+ package org .owasp .esapi .codecs . abstraction ;
2
2
3
3
import org .junit .Assert ;
4
4
import org .junit .Test ;
5
5
import org .junit .runner .RunWith ;
6
6
import org .junit .runners .Parameterized ;
7
+ import org .owasp .esapi .codecs .Codec ;
7
8
8
9
9
10
/**
@@ -19,17 +20,20 @@ public abstract class AbstractCodecStringTest {
19
20
20
21
protected static class CodecStringTestTuple {
21
22
/** Codec reference to be tested.*/
22
- Codec codec ;
23
+ public Codec codec ;
23
24
/** Set of characters that should be considered 'immune' from decoding processes.*/
24
- char [] encodeImmune ;
25
+ public char [] encodeImmune ;
25
26
/** A String representing a contextually encoded String.*/
26
- String input ;
27
+ public String input ;
27
28
/** The decoded representation of the input value.*/
28
- String decodedValue ;
29
+ public String decodedValue ;
29
30
/** Optional field to override the toString value of this tuple. */
30
- String description ;
31
- /** {@inheritDoc}*/
31
+ public String description ;
32
+
33
+ /**Default public constructor.*/
34
+ public CodecStringTestTuple () { /* No Op*/ }
32
35
36
+ /** {@inheritDoc}*/
33
37
@ Override
34
38
public String toString () {
35
39
return description != null ? description : codec .getClass ().getSimpleName () + " " +input ;
Original file line number Diff line number Diff line change 1
- package org .owasp .esapi .codecs ;
1
+ package org .owasp .esapi .codecs . percent ;
2
2
3
3
import java .util .ArrayList ;
4
4
import java .util .Collection ;
9
9
import org .junit .runners .Parameterized .Parameters ;
10
10
import org .owasp .esapi .codecs .PercentCodec ;
11
11
import org .owasp .esapi .codecs .PushbackString ;
12
+ import org .owasp .esapi .codecs .abstraction .AbstractCodecCharacterTest ;
12
13
13
14
/**
14
15
* Codec validation focused on the PercentCodec Character-based api.
Original file line number Diff line number Diff line change 1
- package org .owasp .esapi .codecs ;
1
+ package org .owasp .esapi .codecs . percent ;
2
2
3
3
import java .util .ArrayList ;
4
4
import java .util .Collection ;
5
5
import java .util .List ;
6
6
7
7
import org .junit .runners .Parameterized .Parameters ;
8
8
import org .owasp .esapi .codecs .PercentCodec ;
9
+ import org .owasp .esapi .codecs .abstraction .AbstractCodecStringTest ;
9
10
10
11
/**
11
12
* Codec validation focused on the PercentCodec String-based api.
You can’t perform that action at this time.
0 commit comments