Пример #1
0
        public void PaymentProviderFactory_CreatePaymentForm_EmptyParameters_ThrowNullException()
        {
            var serviceCollection = new ServiceCollection();

            serviceCollection.AddHttpClient();

            var serviceProvider        = serviceCollection.BuildServiceProvider();
            var paymentProviderFactory = new PaymentProviderFactory(serviceProvider);

            Assert.Throws <ArgumentNullException>(() => paymentProviderFactory.CreatePaymentForm(null, new Uri("https://google.com")));
        }
Пример #2
0
        public void PaymentProviderFactory_CreatePaymentForm_PaymentUri_ThrowNullException()
        {
            var serviceCollection = new ServiceCollection();

            serviceCollection.AddHttpClient();

            var serviceProvider        = serviceCollection.BuildServiceProvider();
            var paymentProviderFactory = new PaymentProviderFactory(serviceProvider);

            var parameters = new Dictionary <string, object>();

            parameters.Add("test", decimal.Zero);
            Assert.Throws <ArgumentNullException>(() => paymentProviderFactory.CreatePaymentForm(parameters, null));
        }