public void CalculateCompabilityDistanceValues_Test() { object[] resultValues1 = Genome.CalculateCompabilityDistanceValues(parent1Genome, parent2Genome); object[] resultValues2 = Genome.CalculateCompabilityDistanceValues(parent2Genome, parent1Genome); //Values should be indepented of which parent goes first Assert.AreEqual((int)resultValues1[0], (int)resultValues2[0]); Assert.AreEqual((float)resultValues1[1], (float)resultValues2[1]); Assert.AreEqual((int)resultValues1[2], (int)resultValues2[2]); Assert.AreEqual((int)resultValues1[3], (int)resultValues2[3]); Assert.AreEqual((int)resultValues1[4], (int)resultValues2[4]); //Test amoutn matching Genes int amountMatchingGenes = (int)resultValues1[0]; Assert.AreEqual(10, amountMatchingGenes); //Test amount average weight float averagWeightDif = (float)resultValues1[1]; Assert.AreEqual(0, averagWeightDif); //Test Disjoint genes int disjoinGenes = (int)resultValues1[2]; Assert.AreEqual(3, disjoinGenes); //Test excess Genes int excessGenes = (int)resultValues1[3]; Assert.AreEqual(3, excessGenes); //Test amount genomes in the larger geene int amountGenomes = (int)resultValues1[4]; Assert.AreEqual(15, amountGenomes); }