public void GenerateParentTest() { int FitnessFun(IReadOnlyList <int> guess) => 86; var geneSet = new[] { 1, 3, 5, 7, 9 }; var parent = Genetic <int, int> .GenerateParent(10, geneSet, FitnessFun); Assert.IsInstanceOfType(parent, typeof(Chromosome <int, int>)); Assert.AreEqual(86, parent.Fitness); Assert.IsTrue(geneSet.All(c => parent.Genes.Contains(c))); }