Merge branch 'matchAlgoritmFix' into develop

This commit is contained in:
FredrikNorberg 2012-02-14 17:09:06 +01:00
commit 258661945f
2 changed files with 9 additions and 6 deletions
src
main/java/se/su/dsv/scipro/match
test/java/se/su/dsv/scipro/match/dao

@ -107,10 +107,13 @@ public class GreedyMatchingAlgorithm implements MatchingAlgorithm {
logger.info("Not possible supervisor");
continue;
}
Match match = new Match(); // create a new match
match.setSupervisor(availability.getSupervisor());
match.setProjectIdea(projectIdea);
matchPair = new Pair(match, new Availability(null, 1L, 1, new ProjectClass()));
if(matchPair == null){
Match match = new Match(); // create a new match
match.setSupervisor(availability.getSupervisor());
match.setProjectIdea(projectIdea);
matchPair = new Pair(match, new Availability(null, 1L, 1, new ProjectClass()));
}
matchPair = getBestMatch(matchPair, availability);
}

@ -360,7 +360,7 @@ public class TestSupervisorDao {
supervisor3.getCapabilities().getLanguages().add(english);
List<Employee> result =
target.getAutoCompleteCapableSupervisors(bachelor, allLanguages,
target.getAutoCompleteCapableSupervisors(/*bachelor, allLanguages,*/
"Use", 6);
Assert.assertEquals(Arrays.asList(new Employee[] { supervisor1,
@ -381,7 +381,7 @@ public class TestSupervisorDao {
supervisor3.getCapabilities().getLanguages().add(english);
List<Employee> result =
target.getAutoCompleteCapableSupervisors(bachelor, allLanguages,
target.getAutoCompleteCapableSupervisors(/*bachelor, allLanguages,*/
"Use", 1);
Assert.assertEquals(Arrays.asList(new Employee[] { supervisor1 }),