src/GenFx.Wpf.Tests/PopulationSelectorTest.cs
/// <summary>
/// Tests that the selected population is changed when an intial population is later added to the environment.
/// </summary>
Tests that the selected population is changed when an intial population is later added to the environment.
Tests that the selected population is changed when an intial population is later added to the environment .
[StaFact]
        public void PopulationSelector_InitialPopulationAdded()
        {
            PopulationSelector selector = new PopulationSelector();
            GeneticEnvironment environment = new GeneticEnvironment(Mock.Of<GeneticAlgorithm>());
            selector.Environment = environment;
            Population population = Mock.Of<Population>();
            environment.Populations.Add(population);
            DispatcherHelper.DoEvents();
            Assert.Same(population, selector.SelectedPopulation);
        }
[ StaFact ] public void PopulationSelector_InitialPopulationAdded ( ) { PopulationSelector selector = new PopulationSelector ( ) ; GeneticEnvironment environment = new GeneticEnvironment ( Mock . Of < GeneticAlgorithm > ( ) ) ; selector . Environment = environment ; Population population = Mock . Of < Population > ( ) ; environment . Populations . Add ( population ) ; DispatcherHelper . DoEvents ( ) ; Assert . Same ( population , selector . SelectedPopulation ) ; }
Tests that the selected population is changed when an intial population is later added to the environment.
Tests that the selected population is changed when an intial population is later added to the environment .