コード例 #1
0
        public void GivenValidate_WhenHavingAnOutOfRangeStars_ThenResultShouldBeInvalid()
        {
            var model     = CreateRatingModelFactory.WithStarsOutOfRange();
            var validator = new CreateRatingModelValidator();

            var result = validator.Validate(model);

            result.IsValid.Should().BeFalse();
            result.Errors.Count.Should().Be(1);
        }