Beispiel #1
0
        public async void Validator(
            bool isValidField,
            string field,
            Person person
            )
        {
            var validateResult = await person.ValidateAsync();

            if (isValidField)
            {
                Assert.DoesNotContain(validateResult.Errors, err => err.ErrorMessage.Contains(field));
            }
            else
            {
                Assert.Contains(validateResult.Errors, err => err.ErrorMessage.Contains(field));
            }
        }