public void has_berlin_clock_second_light_on_at_23_59_58() { //arrange Time time = new Time(23, 59, 59); //act var clock = new BerlinClockModel(time); //assert Assert.IsFalse(clock.OnSecondLight); }
private string DrawClock() { var clockRows = new StringBuilder(); var berlinClock = new BerlinClockModel(_currentTime); clockRows.AppendLine(DrawSeconds(berlinClock.OnSecondLight)); clockRows.AppendLine(DrawHoursFirstLine(berlinClock.OnHourFirstRowLights, berlinClock.OffHourFirstRowLights)); clockRows.AppendLine(DrawHoursSecondLine(berlinClock.OnHourSecondRowLights, berlinClock.OffHourSecondRowLights)); clockRows.AppendLine(DrawMinutesFirstLine(berlinClock.OnMinutesFirstRowLights, berlinClock.OffMinutesFirstRowLights)); clockRows.Append(DrawMinutesSecondLine(berlinClock.OnMinutesSecondRowLights, berlinClock.OffMinutesSecondRowLights)); return clockRows.ToString(); }
public void has_berlin_clock_4_and_4_minutes_lights_on_at_10_24_59() { //arrange Time time = new Time(10, 24, 59); //act var clock = new BerlinClockModel(time); //assert Assert.AreEqual(4, clock.OnMinutesFirstRowLights); Assert.AreEqual(7, clock.OffMinutesFirstRowLights); Assert.AreEqual(4, clock.OnMinutesSecondRowLights); Assert.AreEqual(0, clock.OffMinutesSecondRowLights); }
public void has_berlin_clock_2_and_1_hour_lights_on_at_12_31_59() { //arrange Time time = new Time(12, 31, 59); //act var clock = new BerlinClockModel(time); //assert Assert.AreEqual(2, clock.OnHourFirstRowLights); Assert.AreEqual(2, clock.OffHourFirstRowLights); Assert.AreEqual(2, clock.OnHourSecondRowLights); Assert.AreEqual(2, clock.OffHourSecondRowLights); }
public void has_berlin_clock_4_and_3_hour_lights_on_at_23_59_59() { //arrange Time time = new Time(23, 59, 59); //act var clock = new BerlinClockModel(time); //assert Assert.AreEqual(4, clock.OnHourFirstRowLights); Assert.AreEqual(0, clock.OffHourFirstRowLights); Assert.AreEqual(3, clock.OnHourSecondRowLights); Assert.AreEqual(1, clock.OffHourSecondRowLights); }