예제 #1
0
        public void ShouldLightThirdBulbWhenIndex2IsProvided()
        {
            //GIVEN
            var realDisplay = Substitute.For <Display>();
            var driver      = CompositionRoot.CreateDriver(realDisplay);

            //WHEN
            driver.Send(2);

            //THEN
            realDisplay.Received(1).Put(
                "...",
                "..|",
                "...",
                "...",
                "...");
        }
예제 #2
0
        public void ShouldLightAllBulbsWhenAll7IndexesAreProvided()
        {
            //GIVEN
            var realDisplay = Substitute.For <Display>();
            var driver      = CompositionRoot.CreateDriver(realDisplay);

            //WHEN
            driver.Send(0, 1, 2, 3, 4, 5, 6);

            //THEN
            realDisplay.Received(1).Put(
                ".-.",
                "|.|",
                ".-.",
                "|.|",
                ".-.");
        }
예제 #3
0
        public void ShouldLighNoBulbsWhenEmptyArrayIsProvided()
        {
            //GIVEN
            var realDisplay = Substitute.For <Display>();
            var driver      = CompositionRoot.CreateDriver(realDisplay);

            //WHEN
            driver.Send();

            //THEN
            realDisplay.Received(1).Put(
                "...",
                "...",
                "...",
                "...",
                "...");
        }