Refactoring of tests.
This commit is contained in:
parent
3cee49eaec
commit
c9ecb7aea7
@ -113,9 +113,8 @@ public class TestGreedyMatchingAlgorithm {
|
||||
}
|
||||
|
||||
private Result runAlgorithm(final ProjectIdea projectIdea) {
|
||||
GreedyMatchingAlgorithm matchAlgorithm = new GreedyMatchingAlgorithm();
|
||||
unmatchedProjectIdeas.add(projectIdea);
|
||||
return matchAlgorithm.match(supervisorAvailability, unmatchedProjectIdeas, weights);
|
||||
return new GreedyMatchingAlgorithm().match(supervisorAvailability, unmatchedProjectIdeas, weights);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -177,7 +176,8 @@ public class TestGreedyMatchingAlgorithm {
|
||||
|
||||
Result result = runAlgorithm(bachelorProjectIdea);
|
||||
Assert.notEmpty(result.matches);
|
||||
Assert.isTrue(result.matches.get(0).getSupervisor().equals(bachelorSupervisor2));
|
||||
Assert.isTrue(result.matches.get(0).getProjectIdea().equals(bachelorProjectIdea));
|
||||
Assert.isTrue(result.matches.get(0).getSupervisor().equals(bachelorSupervisor2));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user