use of org.evosuite.ga.Chromosome in project evosuite by EvoSuite.
the class NeighbourhoodTest method testEastEastNeighbour.
@Test
public void testEastEastNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.CompactThirteen(population, 10);
Chromosome exepcted_individual = population.get(8);
Chromosome returned_individual = neighbors.get(10);
assertEquals(exepcted_individual, returned_individual);
}
use of org.evosuite.ga.Chromosome in project evosuite by EvoSuite.
the class NeighbourhoodTest method testSouthSouthNeighbour.
@Test
public void testSouthSouthNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.CompactThirteen(population, 10);
Chromosome exepcted_individual = population.get(2);
Chromosome returned_individual = neighbors.get(9);
assertEquals(exepcted_individual, returned_individual);
}
use of org.evosuite.ga.Chromosome in project evosuite by EvoSuite.
the class NeighbourhoodTest method testRingTopology_leftNeighbour.
@Test
public void testRingTopology_leftNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.ringTopology(population, 2);
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 testNorthWestNeighbour.
@Test
public void testNorthWestNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.compactNine(population, 5);
Chromosome exepcted_individual = population.get(0);
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 testEastNeighbour.
@Test
public void testEastNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.linearFive(population, 5);
Chromosome exepcted_individual = population.get(6);
Chromosome returned_individual = neighbors.get(2);
assertEquals(exepcted_individual, returned_individual);
}
Aggregations