protected ValidatePageTypeAttributeTabProperty ( |
||
propertyInfo | ||
attribute | PageTypePropertyAttribute | |
Результат | void |
public void GivenAttributeWithTabPropertySetToAbstractSubClassOfTab_ValidatePageTypeAttributeTabProperty_ThrowsException() { PropertyInfo propertyInfo = typeof(TestPageType).GetProperty("PropertyWithTabSetAbstractTabSubClass"); PageTypePropertyAttribute attribute = propertyInfo.GetCustomAttributes<PageTypePropertyAttribute>().First(); PageTypeDefinitionPropertiesValidator propertiesValidator = new PageTypeDefinitionPropertiesValidator(null); Exception exception = Record.Exception(() => { propertiesValidator.ValidatePageTypeAttributeTabProperty(propertyInfo, attribute); }); Assert.NotNull(exception); }
public void GivenAttributeWithValidTabProperty_ValidatePageTypeAttributeTabProperty_DoesNotThrowException() { PropertyInfo propertyInfo = typeof(TestPageType).GetProperty("PropertyWithValidTab"); PageTypePropertyAttribute attribute = propertyInfo.GetCustomAttributes<PageTypePropertyAttribute>().First(); PageTypeDefinitionPropertiesValidator propertiesValidator = new PageTypeDefinitionPropertiesValidator(null); Exception exception = Record.Exception(() => { propertiesValidator.ValidatePageTypeAttributeTabProperty(propertyInfo, attribute); }); Assert.Null(exception); }