Catel.Test.Extensions.FluentValidation.FluentValidatorProviderFacts.FluentValidatorProviderTest.ModelBaseWithFieldValidationTest C# (CSharp) Method

ModelBaseWithFieldValidationTest() private method

private ModelBaseWithFieldValidationTest ( ) : void
return void
            public void ModelBaseWithFieldValidationTest()
            {
                var personViewModel = new PersonViewModelWithModel { Person = new Person { FirstName = "Igr Alexánder", LastName = string.Empty } };
                
                // I have to add this call here
                ((IModelValidation)personViewModel).Validate();

                var validationSummary = personViewModel.GetValidationContext().GetValidationSummary("Person");

                Assert.IsTrue(validationSummary.HasErrors);
            }