private void DoValidation(ApplicationConfigurationFileNode fileNode, int expectedErrors)
 {
     PropertyInfo fileNameInfo = typeof(ApplicationConfigurationFileNode).GetProperty("FileName");
     ApplicationConfigurationFileValidationAttribute attr = new ApplicationConfigurationFileValidationAttribute();
     List<ValidationError> errors = new List<ValidationError>();
     attr.Validate(fileNode, fileNameInfo, errors, ServiceProvider);
     Assert.AreEqual(expectedErrors, errors.Count);
 }
Ejemplo n.º 2
0
        private void DoValidation(ApplicationConfigurationFileNode fileNode, int expectedErrors)
        {
            PropertyInfo fileNameInfo = typeof(ApplicationConfigurationFileNode).GetProperty("FileName");
            ApplicationConfigurationFileValidationAttribute attr = new ApplicationConfigurationFileValidationAttribute();
            List <ValidationError> errors = new List <ValidationError>();

            attr.Validate(fileNode, fileNameInfo, errors, ServiceProvider);
            Assert.AreEqual(expectedErrors, errors.Count);
        }