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); }
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); }
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); }