public SoldArticle2(Warranty moneyBackGuarantee, Warranty express) { _moneyBackGuarantee = moneyBackGuarantee ?? throw new ArgumentNullException(nameof(moneyBackGuarantee)); _notOperationalWarranty = express ?? throw new ArgumentNullException(nameof(express)); _circuitWarranty = VoidWarranty.Instance; _operationalStatus = DeviceStatus.AllFine(); _warrantyMap = InitializeWarrantyMap(); }
private IReadOnlyDictionary <DeviceStatus, Action <Action> > InitializeWarrantyMap() => new Dictionary <DeviceStatus, Action <Action> >() { [DeviceStatus.AllFine().NotOperational()] = ClaimWarranty };