Пример #1
0
        public void when_duration_is_greater_than_one_and_layout_is_invalid_then_fail(VideoInformationLayoutElement layout, int duration)
        {
            var videoInformation = new VideoInformationElement
            {
                Duration = duration, Layout = layout
            };

            var result = validator.TestValidate(videoInformation);

            result.ShouldHaveValidationErrorFor(m => m.Layout);
        }
Пример #2
0
        public void when_duration_is_greater_than_one_and_no_layout_then_pass()
        {
            var videoInformation = new VideoInformationElement
            {
                Duration = 1, Layout = new VideoInformationLayoutElement()
                {
                    PreRoll = 0, PostRoll = 0
                }
            };

            var result = validator.TestValidate(videoInformation);

            result.ShouldNotHaveValidationErrorFor(m => m.Duration);
        }
Пример #3
0
        public void when_duration_is_less_than_one_then_fail()
        {
            var videoInformation = new VideoInformationElement
            {
                Duration = 0, Layout = new VideoInformationLayoutElement()
                {
                    PreRoll = 0, PostRoll = 0
                }
            };

            var result = validator.TestValidate(videoInformation);

            result.ShouldHaveValidationErrorFor(m => m.Duration);
        }