@@ -60,41 +60,41 @@ void launderLog() {
6060 }
6161
6262 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" ));
6565 }
6666
6767 @ ParameterizedTest
6868 @ MethodSource ("getParamsForTestLaunderServerName" )
6969 void testLaunderServerName (Pair <String , String > param ) {
70- assertEquals (param .getLeft (), param .getRight ());
70+ assertEquals (param .getLeft (), Laundromat . launderServerName ( param .getRight () ));
7171 }
7272
7373 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" ));
8181 }
8282
8383 @ ParameterizedTest
8484 @ MethodSource ("getParamsForTestLaunderUriPath" )
8585 void testLaunderUriPath (Pair <String , String > param ) {
86- assertEquals (param .getLeft (), param .getRight ());
86+ assertEquals (param .getLeft (), Laundromat . launderUriPath ( param .getRight () ));
8787 }
8888
8989 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" ));
9292 }
9393
9494 @ ParameterizedTest
9595 @ MethodSource ("getParamsForTestLaunderPaginationQuery" )
9696 void testLaunderPaginationQuery (Pair <String , String > param ) {
97- assertEquals (param .getLeft (), param .getRight ());
97+ assertEquals (param .getLeft (), Laundromat . launderPaginationQuery ( param .getRight () ));
9898 }
9999
100100 @ Test
0 commit comments