コード例 #1
0
        public void Must_Return_Sequence_YYOOOOOOOOO_When_Value_Is_Equal_To_2()
        {
            TimeMapper mapper = new TimeMapper();

            string codeForMinuteRow = mapper.GetCodeForElevenRectangleMinuteRow(2, Yellow, Red);

            Assert.AreEqual("YYOOOOOOOOO", codeForMinuteRow, "Expected code is YYOOOOOOOOO");
        }
コード例 #2
0
        public void Must_Return_Sequence_YYYY_When_Value_Is_Equal_To_4()
        {
            TimeMapper mapper = new TimeMapper();

            string codeForFirstRow = mapper.GetCode(4, Yellow);

            Assert.AreEqual("YYYY", codeForFirstRow, "Expected code is YYYY");
        }
コード例 #3
0
        public void Must_Return_Sequence_OOOO_When_Value_Is_Equal_To_0()
        {
            TimeMapper mapper = new TimeMapper();

            string codeForFirstRow = mapper.GetCode(0, Red);

            Assert.AreEqual("OOOO", codeForFirstRow, "Expected code is OOOO");
        }
コード例 #4
0
        public void Must_Return_Sequence_RRRR_When_Value_Is_Equal_To_4()
        {
            TimeMapper mapper = new TimeMapper();

            string codeForFirstRow = mapper.GetCode(4, Red);

            Assert.AreEqual("RRRR", codeForFirstRow, "Expected code is RRRR");
        }
コード例 #5
0
        public void Must_Return_Y_Value_When_Number_Of_Seconds_Is_Even()
        {
            TimeMapper mapper = new TimeMapper();

            string value = mapper.GetCodeForBlinkingLed(0, TimeConverter.Yellow);

            Assert.AreEqual(TimeConverter.Yellow.ToString(), value, "Value must be Y since we have a even number of seconds");
        }