use of org.evosuite.ga.Neighbourhood in project evosuite by EvoSuite.
the class NeighbourhoodTest method testMostSouthEastNeighbour.
@Test
public void testMostSouthEastNeighbour() {
this.constructPopulation();
Neighbourhood<Chromosome> neighbourhood = new Neighbourhood<>(Properties.POPULATION);
List<Chromosome> neighbors = new ArrayList<>();
neighbors = neighbourhood.CompactThirteen(population, 15);
Chromosome exepcted_individual = population.get(0);
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 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.Neighbourhood 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.Neighbourhood 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.Neighbourhood 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);
}
Aggregations