public void GivenUriNullOrEmptyShouldDefaultToSandbox(string uri)
        {
            var options = new CheckoutOptions
            {
                SecretKey = "sk_xxx",
                Uri       = uri
            };

            var configuration = options.CreateConfiguration();

            configuration.Uri.ShouldBe(CheckoutConfiguration.SandboxUri);
        }
        public void GivenSandboxFalseShouldUseProductionUri()
        {
            var options = new CheckoutOptions
            {
                SecretKey  = "sk_xxx",
                UseSandbox = false
            };

            var configuration = options.CreateConfiguration();

            configuration.Uri.ShouldBe(CheckoutConfiguration.ProductionUri);
        }
        public void GivenUriProvidedShouldOverrideSandbox()
        {
            var options = new CheckoutOptions
            {
                SecretKey  = "sk_xxx",
                UseSandbox = true,
                Uri        = "https://api.com"
            };

            var configuration = options.CreateConfiguration();

            configuration.Uri.ShouldBe(options.Uri);
        }
        public void CanCreateConfiguration()
        {
            var options = new CheckoutOptions
            {
                SecretKey  = "sk_xxx",
                PublicKey  = "pk_xxx",
                UseSandbox = true
            };

            var configuration = options.CreateConfiguration();

            configuration.SecretKey.ShouldBe(options.SecretKey);
            configuration.PublicKey.ShouldBe(options.PublicKey);
            configuration.Uri.ShouldBe(CheckoutConfiguration.SandboxUri);
        }