-
-
Save dcomartin/60fe67ca764b272a7063635caf6ecae2 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 + QuantityBuffer) | |
{ | |
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