package org.scribe.model; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import org.junit.Test; public class TestOAuthConfig { @Test public void testConstructor() { String key = "Hallo"; String secret = "Hallo2"; OAuthConfig config = new OAuthConfig(key, secret); assertTrue(config.getApiKey().equals(key)); assertTrue(config.getApiSecret().equals(secret)); assertNull(config.getCallback()); assertFalse(config.hasScope()); assertNull(config.getScope()); assertNull(config.getSignatureType()); } @Test public void testConstructor2() { String key = "Hallo"; String secret = "Hallo2"; String callback = "Callback"; SignatureType type = SignatureType.Header; String scope = "Scope"; OAuthConfig config = new OAuthConfig(key, secret, callback, type, scope, null); assertTrue(key.equals(config.getApiKey())); assertTrue(secret.equals(config.getApiSecret())); assertTrue(callback.equals(config.getCallback())); assertTrue(config.hasScope()); assertTrue(scope.equals(config.getScope())); assertTrue(type.equals(config.getSignatureType())); } }