public void GetAuthorizationSchema_ReturnsBearerHeader() { BraintreeGateway oauthGateway = new BraintreeGateway( "client_id$development$integration_client_id", "client_secret$development$integration_client_secret" ); string code = OAuthTestHelper.CreateGrant(oauthGateway, "integration_merchant_id", "read_write"); ResultImpl <OAuthCredentials> accessTokenResult = oauthGateway.OAuth.CreateTokenFromCode(new OAuthCredentialsRequest { Code = code, Scope = "read_write" }); BraintreeGateway gateway = new BraintreeGateway(accessTokenResult.Target.AccessToken); Configuration oauthConfiguration = gateway.Configuration; BraintreeService oauthService = new BraintreeService(oauthConfiguration); string schema = oauthService.GetAuthorizationSchema(); Assert.AreEqual("Bearer", schema); }
public void GetAuthorizationSchema_ReturnsBasicHeader() { string schema = service.GetAuthorizationSchema(); Assert.AreEqual("Basic", schema); }