File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ Hit Scribe as hard and with many threads as you like.
4343
4444* Vimeo
4545
46- * Yammer
47-
4846* Windows Live
4947
5048* and many more! check the [ examples folder] ( http://github.com/fernandezpablo85/scribe-java/tree/master/src/test/java/org/scribe/examples )
Original file line number Diff line number Diff line change 5050 </distributionManagement >
5151
5252 <dependencies >
53+ <dependency >
54+ <groupId >org.hamcrest</groupId >
55+ <artifactId >hamcrest-junit</artifactId >
56+ <version >2.0.0.0</version >
57+ <scope >test</scope >
58+ </dependency >
5359 <dependency >
5460 <groupId >junit</groupId >
5561 <artifactId >junit</artifactId >
Original file line number Diff line number Diff line change 66import org .scribe .exceptions .*;
77import org .scribe .model .*;
88import org .scribe .test .helpers .*;
9+ import static org .hamcrest .core .StringContains .containsString ;
10+ import static org .hamcrest .MatcherAssert .assertThat ;
911
1012public class HeaderExtractorTest
1113{
@@ -23,10 +25,12 @@ public void setup()
2325 @ Test
2426 public void shouldExtractStandardHeader ()
2527 {
26- String expected = "OAuth oauth_callback=\" http%3A%2F%2Fexample%2Fcallback\" , " + "oauth_signature=\" OAuth-Signature\" , "
27- + "oauth_consumer_key=\" AS%23%24%5E%2A%40%26\" , " + "oauth_timestamp=\" 123456\" " ;
2828 String header = extractor .extract (request );
29- assertEquals (expected , header );
29+
30+ assertThat (header , containsString ("oauth_callback=\" http%3A%2F%2Fexample%2Fcallback\" " ));
31+ assertThat (header , containsString ("oauth_signature=\" OAuth-Signature\" " ));
32+ assertThat (header , containsString ("oauth_consumer_key=\" AS%23%24%5E%2A%40%26\" " ));
33+ assertThat (header , containsString ("oauth_timestamp=\" 123456\" " ));
3034 }
3135
3236 @ Test (expected = IllegalArgumentException .class )
You can’t perform that action at this time.
0 commit comments