public void WhenTheTimeIs_MiddleOfTheAfternoon() { int hours = 13; int minutes = 17; int seconds = 01; string expectedResult = "O\nRROO\nRRRO\nYYROOOOOOOO\nYYOO"; var topFirstTime = new TimeConverterTopFirst(); var topSecondTime = new TimeConverterTopSecond(); var bottomFirstTime = new TimeConverterBottomFirst(); var bottomSecondTime = new TimeConverterBottomSecond(); var yellowLampGen = new TimeConverterYellowLamp(); var clock = new BerlinClock.Classes.BerlinClock(topFirstTime, topSecondTime, bottomFirstTime, bottomSecondTime, yellowLampGen); var result = clock.Generate(hours, minutes, seconds); Assert.AreEqual(result, expectedResult); }
public void WhenTheTimeIs_JustBeforeMidnight() { int hours = 23; int minutes = 59; int seconds = 59; string expectedResult = "O\nRRRR\nRRRO\nYYRYYRYYRYY\nYYYY"; var topFirstTime = new TimeConverterTopFirst(); var topSecondTime = new TimeConverterTopSecond(); var bottomFirstTime = new TimeConverterBottomFirst(); var bottomSecondTime = new TimeConverterBottomSecond(); var yellowLampGen = new TimeConverterYellowLamp(); var clock = new BerlinClock.Classes.BerlinClock(topFirstTime, topSecondTime, bottomFirstTime, bottomSecondTime, yellowLampGen); var result = clock.Generate(hours, minutes, seconds); Assert.AreEqual(result, expectedResult); }