Exemplo n.º 1
0
            public void SetNewDiscount_PositiveDiscount_DiscountUpdated(
                Core.Entities.SalesOrderLine salesOrderLine
                )
            {
                //Arrange

                //Act
                salesOrderLine.SetNewDiscount(5);

                //Assert
                salesOrderLine.UnitPriceDiscount.Should().Be(5);
            }
Exemplo n.º 2
0
            public void SetNewDiscount_NegativeDiscount_ThrowSalesOrderDomainException(
                Core.Entities.SalesOrderLine salesOrderLine
                )
            {
                //Arrange

                //Act
                Action act = () => {
                    salesOrderLine.SetNewDiscount(-1);
                };

                //Assert
                act.Should().Throw <SalesDomainException>();
            }