Skip to content

Commit

Permalink
Correct BinaryRankTournamentTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
labrenz committed Aug 12, 2021
1 parent 5b10d7a commit 7a2623b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

public class BinaryRankTournament<C extends Solution<C>> implements Selection<C> {

public BinaryRankTournament() {
}

/**
* Selects a chromosome to be used as parent for mutation or crossover from the given non-null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ void testSelectionByDistance() {
refactorSequence1.setDistance(2.0);
mockedRandomness.when(() -> Randomness.nextInt(2)).thenReturn(0).thenReturn(1);
RefactorSequence candidate2 = selection.apply(population);
assertNotSame(refactorSequence1, candidate1);
assertEquals(refactorSequence1, candidate1);
assertNotSame(refactorSequence1, candidate2);
assertEquals(refactorSequence1, candidate2);
}

@Test
Expand Down

0 comments on commit 7a2623b

Please sign in to comment.