public async Task Entity_EvaluateFitness_Async() { GeneticAlgorithm algorithm = new MockGeneticAlgorithm { PopulationSeed = new MockPopulation(), SelectionOperator = new MockSelectionOperator(), GeneticEntitySeed = new MockEntity(), FitnessEvaluator = new MockFitnessEvaluator(), }; algorithm.FitnessEvaluator = new MockFitnessEvaluator(); algorithm.FitnessEvaluator.Initialize(algorithm); MockEntity entity = new MockEntity(); entity.Initialize(algorithm); entity.Identifier = "123"; await entity.EvaluateFitnessAsync(); Assert.Equal((double)123, entity.RawFitnessValue); Assert.Equal((double)123, entity.ScaledFitnessValue); }