Example #1
0
        public void ClaimWarranty(Action onValidClaim)
        {
            switch (_operationalStatus)
            {
            case DeviceStatusEnum.AllFine:
                _moneyBackGuarantee.Claim(DateTime.Now, onValidClaim);
                break;

            case DeviceStatusEnum.NotOperational:
            case DeviceStatusEnum.NotOperational | DeviceStatusEnum.VisiblyDamaged:
            case DeviceStatusEnum.NotOperational | DeviceStatusEnum.CircuitFailed:
            case DeviceStatusEnum.NotOperational | DeviceStatusEnum.VisiblyDamaged | DeviceStatusEnum.CircuitFailed:
                _notOperationalWarranty.Claim(DateTime.Now, onValidClaim);
                break;

            case DeviceStatusEnum.VisiblyDamaged:
                break;

            case DeviceStatusEnum.CircuitFailed:
            case DeviceStatusEnum.VisiblyDamaged | DeviceStatusEnum.CircuitFailed:
                _circuits.Do(circuit => _circuitWarranty.Claim(circuit.BreakDate, onValidClaim));
                break;
            }
        }
Example #2
0
 public void ClaimCircuitWarranty(Action onValidClaim)
 {
     _circuits.Do(circuit => _circuitExtendedWarranty.Claim(circuit.BreakDate, onValidClaim));
 }
Example #3
0
 private void ClaimMoneyBack(Action action)
 {
     _notOperationalWarranty.Claim(DateTime.Now, action);
 }