made token extraction regex easier and added a test case for multiple parameters
This commit is contained in:
1 parent
7e7d3ff7e0
commit
9f4569fbbc
2 files changed
+11
-2
No files matched your search
@@ -35,6 +35,15 @@ public class TokenExtractor20Test
|
||||
assertEquals("", extracted.getSecret());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldExtractTokenFromResponseWithManyParameters()
|
||||
{
|
||||
String response = "access_token=foo1234&other_stuff=yeah_we_have_this_too&number=42";
|
||||
Token extracted = extractor.extract(response);
|
||||
assertEquals("foo1234", extracted.getToken());
|
||||
assertEquals("", extracted.getSecret());
|
||||
}
|
||||
|
||||
@Test(expected = OAuthException.class)
|
||||
public void shouldThrowExceptionIfTokenIsAbsent()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user