Example #1
0
            public void AddQuantity_PositiveQuantity_QuantityUpdated(
                Core.Entities.SalesOrderLine salesOrderLine
                )
            {
                //Arrange
                var originalQuantity = salesOrderLine.OrderQty;

                //Act
                salesOrderLine.AddQuantity(1);

                //Assert
                salesOrderLine.OrderQty.Should().Be((short)(originalQuantity + 1));
            }
Example #2
0
            public void AddQuantity_ZeroQuantity_QuantityUpdated(
                Core.Entities.SalesOrderLine salesOrderLine
                )
            {
                //Arrange
                var originalQuantity = salesOrderLine.OrderQty;

                //Act
                salesOrderLine.AddQuantity(0);

                //Assert
                salesOrderLine.OrderQty.Should().Be(originalQuantity);
            }
Example #3
0
            public void AddQuantity_NegativeQuantity_ThrowSalesOrderDomainException(
                Core.Entities.SalesOrderLine salesOrderLine
                )
            {
                //Arrange

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

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