public void ZeroMinutesAsSetMinutesTurnsOnNoDiodesInAnyRow()
        {
            BerlinClockTimeRepresentation timeRepresentation = new BerlinClockTimeRepresentation();

            timeRepresentation.SetMinutes(0);

            Assert.IsTrue(timeRepresentation.FirstRow.All(x => !x.IsOn));
            Assert.IsTrue(timeRepresentation.SecondRow.All(x => !x.IsOn));
            Assert.IsTrue(timeRepresentation.ThirdRow.All(x => !x.IsOn));
            Assert.IsTrue(timeRepresentation.ForthRow.All(x => !x.IsOn));
        }
        public void FiftyNineMinutesAsSetMinutesTurnsOnAllDiodesOfThirdAndFourthRow()
        {
            BerlinClockTimeRepresentation timeRepresentation = new BerlinClockTimeRepresentation();

            timeRepresentation.SetMinutes(59);

            Assert.IsTrue(timeRepresentation.FirstRow.All(x => !x.IsOn));
            Assert.IsTrue(timeRepresentation.SecondRow.All(x => !x.IsOn));
            Assert.IsTrue(timeRepresentation.ThirdRow.All(x => x.IsOn));
            Assert.IsTrue(timeRepresentation.ForthRow.All(x => x.IsOn));
        }
        public BerlinClockTimeRepresentation RepresentTime(TimeSpan timeInput)
        {
            if (timeInput.TotalHours > 24.0)
            {
                throw new ArgumentException(string.Format("Hours cannot exeed 24. Got {0}", timeInput));
            }

            BerlinClockTimeRepresentation timeRepresentation = berlinClockFactory.BuildNew();

            timeRepresentation.ResetClock();
            if (timeInput == OneFullDay)
            {
                timeRepresentation.SetHours(24);
            }
            else
            {
                timeRepresentation.SetHours(timeInput.Hours);
            }

            timeRepresentation.SetMinutes(timeInput.Minutes);
            timeRepresentation.SetSeconds(timeInput.Seconds);
            return(timeRepresentation);
        }