-
-
Save dcomartin/a5c258d4174bdc27fb1b1178196afb03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ShipProduct(Quantity quantity) | |
{ | |
if (quantity > _warehouseProductState.QuantityOnHand) | |
{ | |
throw new InvalidDomainException("Cannot Ship to a negative Quantity on Hand."); | |
} | |
var productShipped = new ProductShipped(Sku, quantity, DateTime.UtcNow); | |
Apply(productShipped); | |
Add(productShipped); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment