src/GenFx.Tests/CustomExternalPropertyValidatorAttributeTest.cs
/// <summary>
/// Tests that the constructor sets the state correctly.
/// </summary>
Tests that the constructor sets the state correctly.
Tests that the constructor sets the state correctly .
[Fact]
        public void CustomExternalPropertyValidatorAttribute_ParameterlessCtor()
        {
            CustomExternalPropertyValidatorAttribute attrib =
                new CustomExternalPropertyValidatorAttribute(typeof(CustomComponent), nameof(CustomComponent.MyProperty), typeof(CustomValidator));
            Assert.Equal(nameof(CustomComponent.MyProperty), attrib.TargetPropertyName);
            Assert.Equal(typeof(CustomComponent), attrib.TargetComponentType);
            Assert.Equal(typeof(CustomValidator), attrib.ValidatorType);
            Assert.IsType<CustomValidator>(attrib.Validator);
            Assert.Empty(attrib.ValidatorConstructorArguments);
        }
[ Fact ] public void CustomExternalPropertyValidatorAttribute_ParameterlessCtor ( ) { CustomExternalPropertyValidatorAttribute attrib = new CustomExternalPropertyValidatorAttribute ( typeof ( CustomComponent ) , nameof ( CustomComponent . MyProperty ) , typeof ( CustomValidator ) ) ; Assert . Equal ( nameof ( CustomComponent . MyProperty ) , attrib . TargetPropertyName ) ; Assert . Equal ( typeof ( CustomComponent ) , attrib . TargetComponentType ) ; Assert . Equal ( typeof ( CustomValidator ) , attrib . ValidatorType ) ; Assert . IsType < CustomValidator > ( attrib . Validator ) ; Assert . Empty ( attrib . ValidatorConstructorArguments ) ; }
Tests that the constructor sets the state correctly.
Tests that the constructor sets the state correctly .