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); }
public void GivenValidate_WhenHavingAValidInput_ThenResultShouldBeValid() { var model = CreateRatingModelFactory.Default(); var validator = new CreateRatingModelValidator(); var result = validator.Validate(model); result.IsValid.Should().BeTrue(); result.Errors.Count.Should().Be(0); }