Initial commit
This commit is contained in:
commit
bfbe536886
59 files changed
+2540
No files matched your search
@@ -0,0 +1,32 @@
|
||||
package org.scribe.model;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.*;
|
||||
import org.scribe.model.Request.*;
|
||||
|
||||
public class OAuthConfigTest
|
||||
{
|
||||
|
||||
@Test
|
||||
public void shouldReturnDefaultValuesIfNotSet()
|
||||
{
|
||||
OAuthConfig config = new OAuthConfig();
|
||||
assertEquals(Verb.GET, config.getAccessTokenVerb());
|
||||
assertEquals(Verb.GET, config.getRequestTokenVerb());
|
||||
assertEquals(OAuthConstants.OUT_OF_BAND, config.getCallback());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldOverrideDefaultsIfSet()
|
||||
{
|
||||
OAuthConfig config = new OAuthConfig();
|
||||
config.setCallback("http://callback");
|
||||
config.setAccessTokenVerb(Verb.POST);
|
||||
config.setRequestTokenVerb(Verb.POST);
|
||||
assertEquals("http://callback", config.getCallback());
|
||||
assertEquals(Verb.POST, config.getAccessTokenVerb());
|
||||
assertEquals(Verb.POST, config.getRequestTokenVerb());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user