src/GenFx.Tests/GeneticAlgorithmTest.cs
/// <summary>
/// Tests that an exception is thrown when calling Run twice without initializing in between.
/// </summary>
Tests that an exception is thrown when calling Run twice without initializing in between.
Tests that an exception is thrown when calling Run twice without initializing in between .
[Fact]
        public async Task GeneticAlgorithm_Run_Twice_NoInitialize_Async()
        {
            TestGeneticAlgorithm algorithm = GetAlgorithm();
            await algorithm.InitializeAsync();
            await algorithm.RunAsync();
            await Assert.ThrowsAsync<InvalidOperationException>(async () => await algorithm.RunAsync());
        }
[ Fact ] public async Task GeneticAlgorithm_Run_Twice_NoInitialize_Async ( ) { TestGeneticAlgorithm algorithm = GetAlgorithm ( ) ; await algorithm . InitializeAsync ( ) ; await algorithm . RunAsync ( ) ; await Assert . ThrowsAsync < InvalidOperationException > ( async ( ) => await algorithm . RunAsync ( ) ) ; }
Tests that an exception is thrown when calling Run twice without initializing in between.
Tests that an exception is thrown when calling Run twice without initializing in between .