Ejemplo n.º 1
0
        public bool Execute()
        {
            var entity = new CoffeeMachineEntity();

            ISteamBlastUnit cleaningUnit = new SteamBlastUnit(entity);
            UnitResult <CoffeeMachineEntity> operationResult = cleaningUnit.Execute(9, 50);

            IEspressoUnit espressoUnit = new EspressoUnit(operationResult.Value);

            operationResult = espressoUnit.Execute(6, 50);

            bool isSuccessful = operationResult.IsSuccessful && operationResult.IsSuccessful;

            return(isSuccessful);
        }
Ejemplo n.º 2
0
 public EspressoUnit(CoffeeMachineEntity coffeeMachine)
 {
     this.coffeeMachine = coffeeMachine;
 }
Ejemplo n.º 3
0
 public SteamBlastUnit(CoffeeMachineEntity coffeeMachine)
 {
     this.coffeeMachine = coffeeMachine;
 }