ValidatePageTypeAttributeTabProperty() protected method

protected ValidatePageTypeAttributeTabProperty ( PropertyInfo propertyInfo, PageTypePropertyAttribute attribute ) : void
propertyInfo System.Reflection.PropertyInfo
attribute PageTypePropertyAttribute
return 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);
        }