use of org.evosuite.ga.Chromosome in project evosuite by EvoSuite.
the class NeighbourhoodTest method testMostSouthWestNeighbour.
@Test
public void testMostSouthWestNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.CompactThirteen(population, 12);
Chromosome exepcted_individual = population.get(3);
Chromosome returned_individual = neighbors.get(5);
assertEquals(exepcted_individual, returned_individual);
}
use of org.evosuite.ga.Chromosome in project evosuite by EvoSuite.
the class NeighbourhoodTest method testRingTopology_mostLeftNeighbour.
@Test
public void testRingTopology_mostLeftNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.ringTopology(population, 0);
Chromosome exepcted_individual = population.get(15);
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 testMostNorthEastNeighbour.
@Test
public void testMostNorthEastNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.CompactThirteen(population, 3);
Chromosome exepcted_individual = population.get(12);
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_rightNeighbour.
@Test
public void testRingTopology_rightNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.ringTopology(population, 2);
Chromosome exepcted_individual = population.get(3);
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 testWestNeighbour.
@Test
public void testWestNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.linearFive(population, 5);
Chromosome exepcted_individual = population.get(4);
Chromosome returned_individual = neighbors.get(3);
assertEquals(exepcted_individual, returned_individual);
}
Aggregations