Beispiel #1
0
        public void ShouldReturnBooleanIfGreaterThan500(decimal amount)
        {
            var paymentDto = new PaymentDto()
            {
                Amount = amount
            };
            var premiumPaymentGateway = new PremiumPaymentGateway();

            var result = premiumPaymentGateway.ProcessPaymentAsync(paymentDto).Result;

            result.GetType().Should().Equals(typeof(bool));
        }
Beispiel #2
0
        public void ShouldThrowExceptionIfAmountlessThan500(decimal amount)
        {
            var paymentDto = new PaymentDto()
            {
                Amount = amount
            };
            var premiumPaymentGateway = new PremiumPaymentGateway();

            Action act = () => premiumPaymentGateway.ProcessPaymentAsync(paymentDto);

            act.Should().Throw <ArgumentException>();
        }