public void InstallCircuitry(Part circuit, Warranty extendedWarranty) { _circuitry = Option <Part> .Some(circuit); _circuitWarranty = extendedWarranty; WarrantyRules.CircuitryOperational(); }
public SoldArticle(Warranty moneyBackGuarantee, Warranty expressTimeLimitedWarranty) { MoneyBackGuarantee = moneyBackGuarantee ?? throw new ArgumentNullException(nameof(moneyBackGuarantee)); ExpressTimeLimitedWarranty = VoidWarranty.Instance; _notOperationalWarranty = expressTimeLimitedWarranty ?? throw new ArgumentNullException(nameof(expressTimeLimitedWarranty)); _circuitExtendedWarranty = VoidWarranty.Instance; }
public void InstallCircuit(Part circuit, Warranty extendedWarranty) { _circuits = Option <Part> .Some(circuit); _circuitWarranty = extendedWarranty; _operationalStatus = _operationalStatus.CircuitRepaired(); }
public void InstallCircuit(Part circuit, Warranty extendedWarranty) { _circuits = Option <Part> .Some(circuit); _circuitWarranty = extendedWarranty; _operationalStatus &= DeviceStatusEnum.CircuitFailed; }
public void CircuitNotOperational(DateTime breakDate) { _circuits.Do(circuit => { circuit.MarkDefective(breakDate); _circuitExtendedWarranty = _failedCircuitWarranty; }); }
public SoldArticle3(Warranty moneyBack, Warranty express, IWarrantyRulesFactory rulesFactory) { _moneyBackGuarantee = moneyBack ?? throw new ArgumentNullException(); _notOperationalWarranty = express ?? throw new ArgumentNullException(); _circuitWarranty = VoidWarranty.Instance; WarrantyRules = rulesFactory.Create(ClaimMoneyBack, ClaimNotOperational, ClaimCircuitry); }
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(); }
public void InstallCircuit(Part circuit, Warranty extendedWarranty) { _circuits = Option <Part> .Some(circuit); _failedCircuitWarranty = extendedWarranty; }
public void NotOperational() { MoneyBackGuarantee = VoidWarranty.Instance; ExpressTimeLimitedWarranty = _notOperationalWarranty; }
public SoldArticle1(Warranty moneyBackGuarantee, Warranty express) { _moneyBackGuarantee = moneyBackGuarantee ?? throw new ArgumentNullException(nameof(moneyBackGuarantee)); _notOperationalWarranty = express ?? throw new ArgumentNullException(nameof(express)); _circuitWarranty = VoidWarranty.Instance; }