public void HandleClockTickTest() { var arg = new OnClockTickEventArgs { Maker = this.Maker }; Action act = () => OvenManager.HandleClockTick(null, arg); act.Should().NotThrow(); this.Maker.FirstOven.State.Should().Be(OvenState.Off); this.Maker.FirstOven.CurrentTemperature.Should().Be(22); }
public void HandleHeatingBorderTickTest() { OvenManager.SetState(this.Maker, 232, OvenState.Heating); Switcher.SetSwitch(this.Maker, SwitchState.On); var arg = new OnClockTickEventArgs { Maker = this.Maker }; Action act = () => OvenManager.HandleClockTick(null, arg); act.Should().NotThrow(); this.Maker.FirstOven.State.Should().Be(OvenState.Cooling); this.Maker.FirstOven.CurrentTemperature.Should().Be(240); }
public void HandleOffBiscuitHeatingTickTest() { this.Maker.FirstConveyor.Belt.Add(Biscuit.Create(true, true, false)); OvenManager.SetState(this.Maker, 235, OvenState.Heating); Switcher.SetSwitch(this.Maker, SwitchState.Off); var arg = new OnClockTickEventArgs { Maker = this.Maker }; Action act = () => OvenManager.HandleClockTick(null, arg); act.Should().NotThrow(); this.Maker.FirstOven.State.Should().Be(OvenState.Cooling); this.Maker.FirstOven.CurrentTemperature.Should().Be(240); }