Skip to content

Commit

Permalink
fix unit tests according to refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
plibin-vub committed Mar 29, 2018
1 parent f48c7d3 commit ee98080
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
import santa.simulator.genomes.AminoAcid;

import santa.simulator.population.Population;
import santa.simulator.population.StaticPopulation;
import santa.simulator.population.PopulationGrowth;
import santa.simulator.population.StaticPopulationGrowth;
import santa.simulator.selectors.Selector;
import santa.simulator.selectors.BinarySearchSelector;
import santa.simulator.genomes.GenePool;
import santa.simulator.genomes.SimpleGenePool;

Expand Down Expand Up @@ -81,7 +84,9 @@ public void updateFitnessFromFullPool() {

// populate the genome pool
GenePool pool = new SimpleGenePool();
Population pop = new StaticPopulation(100, pool, null, null);
Selector selector = new BinarySearchSelector();
PopulationGrowth growth = new StaticPopulationGrowth(100);
Population pop = new Population(pool, selector, growth, null);
Sequence founder = new SimpleSequence("aaaaCCCCCcCCCCggTTTTTTaa");
List<Sequence> inoculum = new ArrayList<Sequence>();
inoculum.add(founder);
Expand Down
9 changes: 7 additions & 2 deletions test/santa/simulator/samplers/TreeSamplerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
import santa.simulator.fitness.FrequencyDependentFitnessFactor;

import santa.simulator.population.Population;
import santa.simulator.population.StaticPopulation;
import santa.simulator.population.PopulationGrowth;
import santa.simulator.population.StaticPopulationGrowth;
import santa.simulator.selectors.BinarySearchSelector;
import santa.simulator.selectors.Selector;
import santa.simulator.genomes.GenePool;
import santa.simulator.genomes.SimpleGenePool;

Expand Down Expand Up @@ -42,7 +45,9 @@ public static void IniitializeGenomeDescriptor() throws Exception {
int populationSize = 100;
pool = new SimpleGenePool();
phy = new Phylogeny(populationSize);
pop = new StaticPopulation(populationSize, pool, null, phy);
Selector selector = new BinarySearchSelector();
PopulationGrowth growth = new StaticPopulationGrowth(populationSize);
pop = new Population(pool, selector, growth, phy);
Sequence founder = new SimpleSequence("aaaaCCCCCcCCCCggTTTTTTaa");
List<Sequence> inoculum = new ArrayList<Sequence>();
inoculum.add(founder);
Expand Down

0 comments on commit ee98080

Please sign in to comment.