Refactoring of tests.

This commit is contained in:
Tom Vahlman 2012-02-12 11:39:55 +01:00
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));
}
}