From 7a2623bbc819c2b93292c25592d70f5770c19cd8 Mon Sep 17 00:00:00 2001 From: labrenz Date: Thu, 12 Aug 2021 21:16:55 +0200 Subject: [PATCH] Correct BinaryRankTournamentTest. --- .../metaheuristics/search_operators/BinaryRankTournament.java | 2 -- .../search_operators/BinaryRankTournamentTest.java | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/uni_passau/fim/se2/litterbox/refactor/metaheuristics/search_operators/BinaryRankTournament.java b/src/main/java/de/uni_passau/fim/se2/litterbox/refactor/metaheuristics/search_operators/BinaryRankTournament.java index a8c1057e1..3d9ce95a9 100644 --- a/src/main/java/de/uni_passau/fim/se2/litterbox/refactor/metaheuristics/search_operators/BinaryRankTournament.java +++ b/src/main/java/de/uni_passau/fim/se2/litterbox/refactor/metaheuristics/search_operators/BinaryRankTournament.java @@ -26,8 +26,6 @@ public class BinaryRankTournament> implements Selection { - public BinaryRankTournament() { - } /** * Selects a chromosome to be used as parent for mutation or crossover from the given non-null diff --git a/src/test/java/de/uni_passau/fim/se2/litterbox/refactor/metaheuristics/search_operators/BinaryRankTournamentTest.java b/src/test/java/de/uni_passau/fim/se2/litterbox/refactor/metaheuristics/search_operators/BinaryRankTournamentTest.java index 0bd305db2..8234b15e4 100644 --- a/src/test/java/de/uni_passau/fim/se2/litterbox/refactor/metaheuristics/search_operators/BinaryRankTournamentTest.java +++ b/src/test/java/de/uni_passau/fim/se2/litterbox/refactor/metaheuristics/search_operators/BinaryRankTournamentTest.java @@ -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