コード例 #1
0
        public void GivenCreateFilterModel_WhenHavingNameWithMoreThan50Characters_ThenResultShouldBeInvalid()
        {
            var model = CreateFilterModelFactory.WithNameHavingMoreThan50Characters();

            var validator = new CreateFilterModelValidator();

            var result = validator.Validate(model);

            result.IsValid.Should().BeFalse();
        }
コード例 #2
0
        public void GivenCreateFilterModel_WhenHavingValidName_ThenResultShouldBeValid()
        {
            var model = CreateFilterModelFactory.Default();

            var validator = new CreateFilterModelValidator();

            var result = validator.Validate(model);

            result.IsValid.Should().BeTrue();
        }