src/GenFx.Tests/SettingValidatorAttributeTest.cs
/// <summary>
/// Tests that the constructor initializes the state correctly.
/// </summary>
Tests that the constructor initializes the state correctly.
Tests that the constructor initializes the state correctly .
[Fact]
        public void CustomExternalValidatorAttribute_Ctor()
        {
            Type configType = typeof(FakeComponent);
            string targetProperty = "Value";
            CustomExternalPropertyValidatorAttribute attrib = new CustomExternalPropertyValidatorAttribute(configType, targetProperty, typeof(TestConfigurationValidator));
            Assert.Same(typeof(TestConfigurationValidator), attrib.ValidatorType);
            Assert.IsType<TestConfigurationValidator>(attrib.Validator);
            Assert.Same(configType, attrib.TargetComponentType);
            Assert.Equal(targetProperty, attrib.TargetPropertyName);
        }
[ Fact ] public void CustomExternalValidatorAttribute_Ctor ( ) { Type configType = typeof ( FakeComponent ) ; string targetProperty = " " ; CustomExternalPropertyValidatorAttribute attrib = new CustomExternalPropertyValidatorAttribute ( configType , targetProperty , typeof ( TestConfigurationValidator ) ) ; Assert . Same ( typeof ( TestConfigurationValidator ) , attrib . ValidatorType ) ; Assert . IsType < TestConfigurationValidator > ( attrib . Validator ) ; Assert . Same ( configType , attrib . TargetComponentType ) ; Assert . Equal ( targetProperty , attrib . TargetPropertyName ) ; }
Tests that the constructor initializes the state correctly.
Tests that the constructor initializes the state correctly .