src/GenFx.Components.Tests/BooleanExternalValidatorAttributeTest.cs
/// <summary>
/// Tests that the ctor initializes the state correctly.
/// </summary>
Tests that the ctor initializes the state correctly.
Tests that the ctor initializes the state correctly .
[Fact]
        public void BooleanExternalValidatorAttribute_Ctor()
        {
            BooleanExternalValidatorAttribute attrib =
                new BooleanExternalValidatorAttribute(typeof(TestComponent), nameof(TestComponent.MyProperty), true);
            Assert.Equal(typeof(TestComponent), attrib.TargetComponentType);
            Assert.Equal(nameof(TestComponent.MyProperty), attrib.TargetPropertyName);
            Assert.True(attrib.RequiredValue);
            Assert.IsType<BooleanValidator>(attrib.Validator);
        }
[ Fact ] public void BooleanExternalValidatorAttribute_Ctor ( ) { BooleanExternalValidatorAttribute attrib = new BooleanExternalValidatorAttribute ( typeof ( TestComponent ) , nameof ( TestComponent . MyProperty ) , true ) ; Assert . Equal ( typeof ( TestComponent ) , attrib . TargetComponentType ) ; Assert . Equal ( nameof ( TestComponent . MyProperty ) , attrib . TargetPropertyName ) ; Assert . True ( attrib . RequiredValue ) ; Assert . IsType < BooleanValidator > ( attrib . Validator ) ; }
Tests that the ctor initializes the state correctly.
Tests that the ctor initializes the state correctly .