public void TestSetExcludePaymentMethod()
        {
            var excludePaymentMethod = new List <PaymentMethod> {
                PaymentMethod.INVOICE, PaymentMethod.NORDEASE
            };

            PayPagePayment payPagePayment = WebpayConnection.CreateOrder(SveaConfig.GetDefaultConfig())
                                            .SetCountryCode(TestingTool.DefaultTestCountryCode)
                                            .UsePayPage()
                                            .ExcludePaymentMethod(excludePaymentMethod);

            var expectedValues = new List <string>
            {
                InvoiceType.INVOICESE.Value,
                InvoiceType.INVOICEEUSE.Value,
                InvoiceType.INVOICENO.Value,
                InvoiceType.INVOICEDK.Value,
                InvoiceType.INVOICEFI.Value,
                InvoiceType.INVOICENL.Value,
                InvoiceType.INVOICEDE.Value,
                PaymentMethod.NORDEASE.Value,
            };

            Assert.That(payPagePayment.GetExcludedPaymentMethod(), Is.EqualTo(expectedValues));
        }
        public void TestIncludePaymentMethod()
        {
            var includedPaymentMethod = new List <PaymentMethod>
            {
                PaymentMethod.KORTCERT,
                PaymentMethod.SKRILL,
                PaymentMethod.INVOICE,
                PaymentMethod.PAYMENTPLAN,
                PaymentMethod.SWEDBANKSE,
                PaymentMethod.SHBSE,
                PaymentMethod.SEBFTGSE,
                PaymentMethod.SEBSE,
                PaymentMethod.NORDEASE
            };

            PayPagePayment payPagePayment = WebpayConnection.CreateOrder(SveaConfig.GetDefaultConfig())
                                            .SetCountryCode(TestingTool.DefaultTestCountryCode)
                                            .UsePayPage()
                                            .IncludePaymentMethod(includedPaymentMethod);

            Assert.That(payPagePayment.GetExcludedPaymentMethod().Count, Is.EqualTo(15));
            Assert.That(payPagePayment.GetExcludedPaymentMethod()[0], Is.EqualTo("SVEAINVOICESE"));
            Assert.That(payPagePayment.GetExcludedPaymentMethod()[1], Is.EqualTo("SVEASPLITSE"));
            Assert.That(payPagePayment.GetExcludedPaymentMethod()[2], Is.EqualTo("SVEAINVOICEEU_DE"));
            Assert.That(payPagePayment.GetExcludedPaymentMethod()[3], Is.EqualTo("SVEASPLITEU_DE"));
            Assert.That(payPagePayment.GetExcludedPaymentMethod()[4], Is.EqualTo("SVEAINVOICEEU_DK"));
            Assert.That(payPagePayment.GetExcludedPaymentMethod()[12], Is.EqualTo("SVEACARDPAY"));
            Assert.That(payPagePayment.GetExcludedPaymentMethod()[13], Is.EqualTo("PAYPAL"));
            Assert.That(payPagePayment.GetExcludedPaymentMethod()[14], Is.EqualTo("BANKAXESS"));
        }
        public void TestDefaultSe()
        {
            PayPagePayment payPagePayment = WebpayConnection.CreateOrder(SveaConfig.GetDefaultConfig())
                                            .SetCountryCode(TestingTool.DefaultTestCountryCode)
                                            .UsePayPage();

            payPagePayment.ConfigureExcludedPaymentMethod();

            Assert.That(payPagePayment.GetExcludedPaymentMethod().Count, Is.EqualTo(0));
        }
        public void TestSetExcludePaymentMethodDefaultConfigurationNoExcluded()
        {
            PayPagePayment payPagePayment = WebpayConnection.CreateOrder(SveaConfig.GetDefaultConfig())
                                                            .UsePayPage()
                                                            .ExcludePaymentMethod();
            payPagePayment.IncludePaymentMethod();

            Assert.That(payPagePayment.GetExcludedPaymentMethod().Count, Is.EqualTo(23));
            Assert.That(payPagePayment.GetIncludedPaymentMethod().Count, Is.EqualTo(0));
        }
        public void TestIncludeCardPaymentMethod()
        {
            var includedPaymentMethod = new List<PaymentMethod> {PaymentMethod.KORTCERT, PaymentMethod.SKRILL};
            PayPagePayment payPagePayment = WebpayConnection.CreateOrder(SveaConfig.GetDefaultConfig())
                                                            .SetCountryCode(TestingTool.DefaultTestCountryCode)
                                                            .UsePayPage()
                                                            .IncludePaymentMethod(includedPaymentMethod);

            Assert.That(payPagePayment.GetIncludedPaymentMethod().Count, Is.EqualTo(2));
        }
        public void TestSetPaymentMethodPaymentPlanNl()
        {
            PayPagePayment payPagePayment = WebpayConnection.CreateOrder(SveaConfig.GetDefaultConfig())
                                                            .SetCountryCode(CountryCode.NL)
                                                            .UsePayPage()
                                                            .SetPaymentMethod(PaymentMethod.PAYMENTPLAN);
            payPagePayment.ConfigureExcludedPaymentMethod();

            Assert.That(payPagePayment.GetPaymentMethod(), Is.EqualTo(PaymentPlanType.PAYMENTPLANNL.Value));
        }
        public void TestSetPaymentMethodDe()
        {
            PayPagePayment payPagePayment = WebpayConnection.CreateOrder(SveaConfig.GetDefaultConfig())
                                            .SetCountryCode(CountryCode.DE)
                                            .UsePayPage()
                                            .SetPaymentMethod(PaymentMethod.INVOICE);

            payPagePayment.ConfigureExcludedPaymentMethod();

            Assert.That(payPagePayment.GetPaymentMethod(), Is.EqualTo(InvoiceType.INVOICEDE.Value));
        }
        public void TestExcludeCardPaymentMethod()
        {
            PayPagePayment payPagePayment = WebpayConnection.CreateOrder(SveaConfig.GetDefaultConfig())
                                                            .SetCountryCode(TestingTool.DefaultTestCountryCode)
                                                            .UsePayPage()
                                                            .ExcludeCardPaymentMethod();

            Assert.That(payPagePayment.GetExcludedPaymentMethod().Count, Is.EqualTo(2));
            Assert.That(payPagePayment.GetExcludedPaymentMethod()[0], Is.EqualTo(PaymentMethod.KORTCERT.Value));
            Assert.That(payPagePayment.GetExcludedPaymentMethod()[1], Is.EqualTo(PaymentMethod.SKRILL.Value));
        }
        public void TestExcludePaymentPlanSe()
        {
            var list = new List<PaymentMethod> {PaymentMethod.PAYMENTPLAN};
            PayPagePayment payPagePayment = WebpayConnection.CreateOrder(SveaConfig.GetDefaultConfig())
                                                            .SetCountryCode(TestingTool.DefaultTestCountryCode)
                                                            .UsePayPage()
                                                            .ExcludePaymentMethod(list);

            payPagePayment.ConfigureExcludedPaymentMethod();

            Assert.That(payPagePayment.GetExcludedPaymentMethod()[0], Is.EqualTo(PaymentPlanType.PAYMENTPLANEUSE.Value));
        }