public void ShouldThrowArgumentOutOfRangeExceptionWhenLampOnCountIsGreaterThenLampCount([Random(0, 5, 1)] int lampCount, [Random(6, 10, 1)] int lampOnCount)
        {
            //GIVEN
            var lampRowValidator = new LampRowValidator(lampCount);

            //THEN
            Assert.Throws <ArgumentOutOfRangeException>(() => lampRowValidator.Validate(lampOnCount));
        }
        public void ShouldNotThrowArgumentOutOfRangeExceptionWhenLampOnCountIsLowerOrEqualLampCount([Random(5, 10, 1)] int lampCount, [Random(0, 5, 1)] int lampOnCount)
        {
            //GIVEN
            var lampRowValidator = new LampRowValidator(lampCount);

            //THEN
            Assert.DoesNotThrow(() => lampRowValidator.Validate(lampOnCount));
        }
示例#3
0
 protected LampRowParser(int lampCount)
 {
     _lampRowValidator = new LampRowValidator(lampCount);
     _lampCount        = lampCount;
 }