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)); }
public void AddQuantity_ZeroQuantity_QuantityUpdated( Core.Entities.SalesOrderLine salesOrderLine ) { //Arrange var originalQuantity = salesOrderLine.OrderQty; //Act salesOrderLine.AddQuantity(0); //Assert salesOrderLine.OrderQty.Should().Be(originalQuantity); }
public void AddQuantity_NegativeQuantity_ThrowSalesOrderDomainException( Core.Entities.SalesOrderLine salesOrderLine ) { //Arrange //Act Action act = () => { salesOrderLine.AddQuantity(-1); }; //Assert act.Should().Throw <SalesDomainException>(); }