Пример #1
0
        public void ValidateDiscountAmount_InvalidInput_ReturnsDomainException()
        {
            // Assign
            var validator       = new DiscountValidator();
            var order           = OrderFactory.CreateSimpleOrder();
            var invalidDiscount = 1;

            // Assert
            Assert.Throws <DomainException>(()
                                            // Act
                                            => validator.ValidateDiscountAmount(order, invalidDiscount));
        }
Пример #2
0
        public void ValidateDiscountAmount_ValidInput_ReturnsVoid()
        {
            // Assign
            var validator = new DiscountValidator();
            var order     = OrderFactory.CreateSimpleOrder();

            // Act
            validator.ValidateDiscountAmount(order, voucherPercentageDiscount: 10);

            // Assert
            // No exception was thrown.
            Assert.True(true);
        }