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