File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public void setup()
2323 @ Test
2424 public void shouldExtractBaseStringFromOAuthRequest ()
2525 {
26- String expected = "GET&http%3A%2F%2Fexample.com&oauth_callback%3Dhttp%253A%252F%252Fexample%252Fcallback%26oauth_consumer_key%3DAS%2523%2524%255E* %2540%2526%26oauth_signature%3DOAuth-Signature%26oauth_timestamp%3D123456" ;
26+ String expected = "GET&http%3A%2F%2Fexample.com&oauth_callback%3Dhttp%253A%252F%252Fexample%252Fcallback%26oauth_consumer_key%3DAS%2523%2524%255E%252A %2540%2526%26oauth_signature%3DOAuth-Signature%26oauth_timestamp%3D123456" ;
2727 String baseString = extractor .extract (request );
2828 assertEquals (expected , baseString );
2929 }
@@ -45,7 +45,7 @@ public void shouldThrowExceptionIfRquestHasNoOAuthParameters()
4545 @ Test
4646 public void shouldProperlyEncodeSpaces ()
4747 {
48- String expected = "GET&http%3A%2F%2Fexample.com&body%3Dthis%2520param%2520has%2520whitespace%26oauth_callback%3Dhttp%253A%252F%252Fexample%252Fcallback%26oauth_consumer_key%3DAS%2523%2524%255E* %2540%2526%26oauth_signature%3DOAuth-Signature%26oauth_timestamp%3D123456" ;
48+ String expected = "GET&http%3A%2F%2Fexample.com&body%3Dthis%2520param%2520has%2520whitespace%26oauth_callback%3Dhttp%253A%252F%252Fexample%252Fcallback%26oauth_consumer_key%3DAS%2523%2524%255E%252A %2540%2526%26oauth_signature%3DOAuth-Signature%26oauth_timestamp%3D123456" ;
4949 request .addBodyParameter ("body" , "this param has whitespace" );
5050 assertEquals (expected , extractor .extract (request ));
5151 }
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public void setup()
2424 public void shouldExtractStandardHeader ()
2525 {
2626 String expected = "OAuth oauth_callback=\" http%3A%2F%2Fexample%2Fcallback\" , " + "oauth_signature=\" OAuth-Signature\" , "
27- + "oauth_consumer_key=\" AS%23%24%5E* %40%26\" , " + "oauth_timestamp=\" 123456\" " ;
27+ + "oauth_consumer_key=\" AS%23%24%5E%2A %40%26\" , " + "oauth_timestamp=\" 123456\" " ;
2828 String header = extractor .extract (request );
2929 assertEquals (expected , header );
3030 }
You can’t perform that action at this time.
0 commit comments