private void Default_shouldCreateDefaultStaticKeysSdkCredentials()
        {
            var credentials = new StaticKeysSdkCredentials(ValidDefaultSk, ValidDefaultPk);

            credentials.PlatformType.ShouldBe(PlatformType.Default);
            credentials.PublicKey.ShouldBe(ValidDefaultPk);
            credentials.SecretKey.ShouldBe(ValidDefaultSk);
        }
        private void ShouldCreateConfiguration()
        {
            var credentials           = new StaticKeysSdkCredentials(ValidDefaultSk, ValidDefaultPk);
            var httpClientFactoryMock = new Mock <IHttpClientFactory>();
            var configuration         =
                new CheckoutConfiguration(credentials, Environment.Production, httpClientFactoryMock.Object);

            configuration.Environment.ShouldBe(Environment.Production);
            configuration.SdkCredentials.ShouldBeAssignableTo(typeof(StaticKeysSdkCredentials));
        }
        private void ShouldCreateDefaultStaticKeysSdkCredentialsForProd()
        {
            const string validDefaultSk = "sk_m73dzbpy7cf3gfd46xr4yj5xo4e";
            const string validDefaultPk = "pk_pkhpdtvmkgf7hdnpwnbhw7r2uic";

            var credentials = new StaticKeysSdkCredentials(validDefaultSk, validDefaultPk);

            credentials.PlatformType.ShouldBe(PlatformType.Default);
            credentials.PublicKey.ShouldBe(validDefaultPk);
            credentials.SecretKey.ShouldBe(validDefaultSk);
        }
        private void ShouldGetAuthorization()
        {
            var credentials = new StaticKeysSdkCredentials(ValidDefaultSk, ValidDefaultPk);

            var auth1 = credentials.GetSdkAuthorization(SdkAuthorizationType.SecretKey);

            auth1.ShouldNotBeNull();
            auth1.GetAuthorizationHeader().ShouldBe($"{Bearer} {ValidDefaultSk}");

            var auth2 = credentials.GetSdkAuthorization(SdkAuthorizationType.PublicKey);

            auth2.ShouldNotBeNull();
            auth2.GetAuthorizationHeader().ShouldBe($"{Bearer} {ValidDefaultPk}");
        }