@@ -60,41 +60,41 @@ void launderLog() {
60
60
}
61
61
62
62
private static Stream <Pair <String , String >> getParamsForTestLaunderServerName () {
63
- return Stream .of (Pair .of ("foo.example.com" , Laundromat . launderServerName ( "--foo.example\n .com?=" ) ),
64
- Pair .of ("[2001:db8::1]:8080" , Laundromat . launderServerName ( "[2001:db8::1]:8080" ) ));
63
+ return Stream .of (Pair .of ("foo.example.com" , "--foo.example\n .com?=" ),
64
+ Pair .of ("[2001:db8::1]:8080" , "[2001:db8::1]:8080" ));
65
65
}
66
66
67
67
@ ParameterizedTest
68
68
@ MethodSource ("getParamsForTestLaunderServerName" )
69
69
void testLaunderServerName (Pair <String , String > param ) {
70
- assertEquals (param .getLeft (), param .getRight ());
70
+ assertEquals (param .getLeft (), Laundromat . launderServerName ( param .getRight () ));
71
71
}
72
72
73
73
private static Stream <Pair <String , String >> getParamsForTestLaunderUriPath () {
74
- return Stream .of (Pair .of ("foo" , Laundromat . launderUriPath ( "../../../foo" ) ),
75
- Pair .of ("/foo/bar" , Laundromat . launderUriPath ( "/foo/../../bar" ) ),
76
- Pair .of ("/foo/bar.." , Laundromat . launderUriPath ( "/foo/bar.." ) ),
77
- Pair .of ("/foo/bar" , Laundromat . launderUriPath ( "/foo//bar" ) ),
78
- Pair .of ("..foo/bar" , Laundromat . launderUriPath ( "..foo/bar" ) ),
79
- Pair .of ("/foo/bar.txt" , Laundromat . launderUriPath ( "/foo/bar.txt" ) ),
80
- Pair .of ("/foo/bar_.txt" , Laundromat . launderUriPath ( "/foo/bar\u0000 .txt" ) ));
74
+ return Stream .of (Pair .of ("foo" , "../../../foo" ),
75
+ Pair .of ("/foo/bar" , "/foo/../../bar" ),
76
+ Pair .of ("/foo/bar.." , "/foo/bar.." ),
77
+ Pair .of ("/foo/bar" , "/foo//bar" ),
78
+ Pair .of ("..foo/bar" , "..foo/bar" ),
79
+ Pair .of ("/foo/bar.txt" , "/foo/bar.txt" ),
80
+ Pair .of ("/foo/bar_.txt" , "/foo/bar\u0000 .txt" ));
81
81
}
82
82
83
83
@ ParameterizedTest
84
84
@ MethodSource ("getParamsForTestLaunderUriPath" )
85
85
void testLaunderUriPath (Pair <String , String > param ) {
86
- assertEquals (param .getLeft (), param .getRight ());
86
+ assertEquals (param .getLeft (), Laundromat . launderUriPath ( param .getRight () ));
87
87
}
88
88
89
89
private static Stream <Pair <String , String >> getParamsForTestLaunderPaginationQuery () {
90
- return Stream .of (Pair .of ("foo=bar" , Laundromat . launderPaginationQuery ( "?foo=/bar" ) ),
91
- Pair .of ("foo=bar&1=2" , Laundromat . launderPaginationQuery ( "foo=bar&1=2" ) ));
90
+ return Stream .of (Pair .of ("foo=bar" , "?foo=/bar" ),
91
+ Pair .of ("foo=bar&1=2" , "foo=bar&1=2" ));
92
92
}
93
93
94
94
@ ParameterizedTest
95
95
@ MethodSource ("getParamsForTestLaunderPaginationQuery" )
96
96
void testLaunderPaginationQuery (Pair <String , String > param ) {
97
- assertEquals (param .getLeft (), param .getRight ());
97
+ assertEquals (param .getLeft (), Laundromat . launderPaginationQuery ( param .getRight () ));
98
98
}
99
99
100
100
@ Test
0 commit comments