use of org.evosuite.ga.Chromosome in project evosuite by EvoSuite.
the class NeighbourhoodTest method testNorthEastNeighbour.
@Test
public void testNorthEastNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.compactNine(population, 5);
Chromosome exepcted_individual = population.get(2);
Chromosome returned_individual = neighbors.get(6);
assertEquals(exepcted_individual, returned_individual);
}
use of org.evosuite.ga.Chromosome in project evosuite by EvoSuite.
the class NeighbourhoodTest method testRingTopology_mostRightNeighbour.
@Test
public void testRingTopology_mostRightNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.ringTopology(population, 15);
Chromosome exepcted_individual = population.get(0);
Chromosome returned_individual = neighbors.get(2);
assertEquals(exepcted_individual, returned_individual);
}
use of org.evosuite.ga.Chromosome in project evosuite by EvoSuite.
the class NeighbourhoodTest method testNorthNeighbour.
@Test
public void testNorthNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.linearFive(population, 5);
Chromosome exepcted_individual = population.get(1);
Chromosome returned_individual = neighbors.get(0);
assertEquals(exepcted_individual, returned_individual);
}
use of org.evosuite.ga.Chromosome in project evosuite by EvoSuite.
the class NeighbourhoodTest method testMostNorthWestNeighbour.
@Test
public void testMostNorthWestNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.CompactThirteen(population, 0);
Chromosome exepcted_individual = population.get(15);
Chromosome returned_individual = neighbors.get(4);
assertEquals(exepcted_individual, returned_individual);
}
use of org.evosuite.ga.Chromosome in project evosuite by EvoSuite.
the class NeighbourhoodTest method testWestWestNeighbour.
@Test
public void testWestWestNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.CompactThirteen(population, 5);
Chromosome exepcted_individual = population.get(7);
Chromosome returned_individual = neighbors.get(11);
assertEquals(exepcted_individual, returned_individual);
}
Aggregations