src/GenFx.Tests/RequiredComponentTypeValidatorTest.cs
/// <summary>
/// Test that the <see cref="RequiredComponentTypeValidator.IsValid"/> method works correctly.
/// </summary>
Test that the  method works correctly.
Test that the method works correctly .
[Fact]
        public void RequiredComponentTypeValidator_IsValid_WithAlgorithm()
        {
            MockGeneticAlgorithm algorithm = new MockGeneticAlgorithm();
            CustomValidator validator = new CustomValidator(typeof(MockEntity), typeof(GeneticEntity))
            {
                HasRequiredComponentReturnValue = true,
                ExpectedGeneticAlgorithm = algorithm
            };
            bool result = validator.IsValid(algorithm, out string errorMessage);
            Assert.True(result);
            Assert.Null(errorMessage);
        }
[ Fact ] public void RequiredComponentTypeValidator_IsValid_WithAlgorithm ( ) { MockGeneticAlgorithm algorithm = new MockGeneticAlgorithm ( ) ; CustomValidator validator = new CustomValidator ( typeof ( MockEntity ) , typeof ( GeneticEntity ) ) { HasRequiredComponentReturnValue = true , ExpectedGeneticAlgorithm = algorithm } ; bool result = validator . IsValid ( algorithm , out string errorMessage ) ; Assert . True ( result ) ; Assert . Null ( errorMessage ) ; }
Test that the  method works correctly.
Test that the method works correctly .