예제 #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));
        }
예제 #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>();
        }