// Updates that must be applied last. Default behaviour defined protected virtual void ApplyPostUpdates(FinestGood finestGood) { // 1. Verify minimum Quality finestGood.Quality = InventoryManagementRules.GetMinimumAdjustedQuality(finestGood.Quality); // 2. Verify Maxium Quality finestGood.Quality = InventoryManagementRules.GetMaximumAdjustedQuality(finestGood.Quality); }
protected override void ApplyGeneralUpdates(FinestGood finestGood) { var sellInPassed = InventoryManagementRules.HasSellInPassed(finestGood.SellIn); finestGood.Quality = InventoryManagementRules.GetDegradedQuality(finestGood.Quality, sellInPassed); }
protected override void ApplyGeneralUpdates(FinestGood finestGood) { finestGood.Quality = InventoryManagementRules.GetEventQuality(finestGood.Quality, finestGood.SellIn); }
protected override void ApplyGeneralUpdates(FinestGood finestGood) { finestGood.Quality = InventoryManagementRules.GetMaturedQuality(finestGood.Quality); }
// Updates that must be applied first. Default behaviour defined protected virtual void ApplyPreUpdates(FinestGood finestGood) { // 1. Daily SellIn Adjustment finestGood.SellIn = InventoryManagementRules.GetUpdatedSellIn(finestGood.SellIn); }