Merge branch 'matchAlgoritmFix' into develop
This commit is contained in:
commit
258661945f
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 }),
|
||||
|
Loading…
x
Reference in New Issue
Block a user