예제 #1
0
        public void InstallCircuitry(Part circuit, Warranty extendedWarranty)
        {
            _circuitry = Option <Part> .Some(circuit);

            _circuitWarranty = extendedWarranty;
            WarrantyRules.CircuitryOperational();
        }
예제 #2
0
 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;
 }
예제 #3
0
        public void InstallCircuit(Part circuit, Warranty extendedWarranty)
        {
            _circuits = Option <Part> .Some(circuit);

            _circuitWarranty   = extendedWarranty;
            _operationalStatus = _operationalStatus.CircuitRepaired();
        }
예제 #4
0
        public void InstallCircuit(Part circuit, Warranty extendedWarranty)
        {
            _circuits = Option <Part> .Some(circuit);

            _circuitWarranty    = extendedWarranty;
            _operationalStatus &= DeviceStatusEnum.CircuitFailed;
        }
예제 #5
0
 public void CircuitNotOperational(DateTime breakDate)
 {
     _circuits.Do(circuit =>
     {
         circuit.MarkDefective(breakDate);
         _circuitExtendedWarranty = _failedCircuitWarranty;
     });
 }
예제 #6
0
        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);
        }
예제 #7
0
 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();
 }
예제 #8
0
        public void InstallCircuit(Part circuit, Warranty extendedWarranty)
        {
            _circuits = Option <Part> .Some(circuit);

            _failedCircuitWarranty = extendedWarranty;
        }
예제 #9
0
 public void NotOperational()
 {
     MoneyBackGuarantee         = VoidWarranty.Instance;
     ExpressTimeLimitedWarranty = _notOperationalWarranty;
 }
예제 #10
0
 public SoldArticle1(Warranty moneyBackGuarantee, Warranty express)
 {
     _moneyBackGuarantee     = moneyBackGuarantee ?? throw new ArgumentNullException(nameof(moneyBackGuarantee));
     _notOperationalWarranty = express ?? throw new ArgumentNullException(nameof(express));
     _circuitWarranty        = VoidWarranty.Instance;
 }