Ejemplo n.º 1
0
        public void Poll_EmptyWarmer_TurnsOffBoiler(
            [Frozen]Mock<ICoffeeMaker> coffeeMaker,
            Boiler sut)
        {
            sut.Poll(BoilerStatus.EMPTY, BrewButtonStatus.PUSHED, WarmerPlateStatus.WARMER_EMPTY);
            coffeeMaker.Verify(cm => cm.SetBoilerState(BoilerState.OFF));

            sut.Poll(BoilerStatus.EMPTY, BrewButtonStatus.NOT_PUSHED, WarmerPlateStatus.WARMER_EMPTY);
            coffeeMaker.Verify(cm => cm.SetBoilerState(BoilerState.OFF));

            sut.Poll(BoilerStatus.NOT_EMPTY, BrewButtonStatus.PUSHED, WarmerPlateStatus.WARMER_EMPTY);
            coffeeMaker.Verify(cm => cm.SetBoilerState(BoilerState.OFF));

            sut.Poll(BoilerStatus.NOT_EMPTY, BrewButtonStatus.NOT_PUSHED, WarmerPlateStatus.WARMER_EMPTY);
            coffeeMaker.Verify(cm => cm.SetBoilerState(BoilerState.OFF));
        }
Ejemplo n.º 2
0
 public void Poll_PushedButtonAndNonEmptyBoilerAndEmptyPot_TurnsOnBoiler(
     [Frozen]Mock<ICoffeeMaker> coffeeMaker,
     Boiler sut)
 {
     sut.Poll(BoilerStatus.NOT_EMPTY, BrewButtonStatus.PUSHED, WarmerPlateStatus.POT_NOT_EMPTY);
     coffeeMaker.Verify(cm => cm.SetBoilerState(BoilerState.ON));
 }