Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class StockMonitorTest {
public void alertSentWhenProductNeedsReordering() {
Alert alert = mock(Alert.class);
ReorderLevel reorderLevel = product1 -> 10;
Product product = new Product(811, 11, 14);
Warehouse warehouse = productId -> product;
StockMonitor monitor = new StockMonitor(alert, warehouse, reorderLevel);
monitor.productSold(811, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment