Пример #1
0
        public void GetHours_WorksAsExpected(int upper, int lower, string expected)
        {
            var    formatter = new ClockFormatter();
            string x         = formatter.GetHours(upper, lower);

            Assert.Equal(x, expected);
        }
Пример #2
0
        public void GetBaseClock_whenAllLettersMustBeOn_ReturnLettersWithPadding()
        {
            var    formatter = new ClockFormatter();
            string x         = formatter.GetBaseClock(2, 'a', 4);

            Assert.Equal(x, "aaOO");
        }
Пример #3
0
        public void IsSecondOn_WorksAsExpected(bool seconds, string expectedValue)
        {
            var formatter = new ClockFormatter();
            var output    = formatter.GetSeconds(seconds);

            Assert.Equal(output, expectedValue);
        }
Пример #4
0
        public void GetBaseClock_IfTooManyLightsToSwitchOn_ThrowsException()
        {
            var formatter = new ClockFormatter();

            Assert.Throws <ArgumentException>(() => formatter.GetBaseClock(999, 'a', 10));
        }