Added a test to verify that the match algorithm considers availability (both per project class and "total availability")and "project class" when sorting matches according to relevance.
This commit is contained in:
parent
0595121bc9
commit
900b06228d
@ -468,12 +468,12 @@ public class TestGreedyMatchingAlgorithm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// We now perform three tests to verify the correctness of the method GreedyMatchingAlgorithm # Pair # compareTo,
|
// We now perform 4 tests to verify the correctness of the method GreedyMatchingAlgorithm # Pair # compareTo,
|
||||||
// which sorts the list of matches, i. e. Pairs according to specific criterias
|
// which sorts the list of matches, i. e. Pairs according to specific criterias
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
@Rollback
|
@Rollback
|
||||||
/* 1.
|
/* Test 1.
|
||||||
* ==================================================================================
|
* ==================================================================================
|
||||||
*
|
*
|
||||||
* Prerequisites: two supervisors are matched against one bachelor project idea,
|
* Prerequisites: two supervisors are matched against one bachelor project idea,
|
||||||
@ -516,7 +516,7 @@ public class TestGreedyMatchingAlgorithm {
|
|||||||
@Transactional
|
@Transactional
|
||||||
@Rollback
|
@Rollback
|
||||||
/* .
|
/* .
|
||||||
* 2.
|
* Test 2.
|
||||||
* ==================================================================================
|
* ==================================================================================
|
||||||
* Prerequisites: two supervisors are matched against one bachelor project idea,
|
* Prerequisites: two supervisors are matched against one bachelor project idea,
|
||||||
* both supervisors have the SAME "total availability" (9)
|
* both supervisors have the SAME "total availability" (9)
|
||||||
@ -556,7 +556,7 @@ public class TestGreedyMatchingAlgorithm {
|
|||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
@Rollback
|
@Rollback
|
||||||
/* 3.
|
/* Test 3.
|
||||||
* ==================================================================================
|
* ==================================================================================
|
||||||
* Prerequisites: two supervisors are matched against one bachelor project idea,
|
* Prerequisites: two supervisors are matched against one bachelor project idea,
|
||||||
* both supervisors have "open" availability slots for both master and bachelor projects
|
* both supervisors have "open" availability slots for both master and bachelor projects
|
||||||
@ -596,11 +596,11 @@ public class TestGreedyMatchingAlgorithm {
|
|||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
@Rollback
|
@Rollback
|
||||||
/* three supervisors are matched against three project ideas
|
/* Test 4
|
||||||
* tests that project classes are regarded when matching project ideas and supervisors
|
* =============================================================================================
|
||||||
* when available slots are exactly the same
|
* The test verifies that project classes are regarded when sorting matched Pairs (containing a project idea and a supervisor)
|
||||||
* this test, which may be a duplicate, is done only to test if the matching algorithm can handle a more "complicated" match
|
* The test also verifies that the matching algorithm can handle more "complicated" match situations.
|
||||||
* */
|
* */
|
||||||
public void testThreeSupervisorsAndThreeProjectIdeas_Available_Slots_Are_The_Same() {
|
public void testThreeSupervisorsAndThreeProjectIdeas_Available_Slots_Are_The_Same() {
|
||||||
List<ProjectIdea> projectIdeaList = new ArrayList<ProjectIdea>();
|
List<ProjectIdea> projectIdeaList = new ArrayList<ProjectIdea>();
|
||||||
List<Employee> supervisorList = new ArrayList<Employee>();
|
List<Employee> supervisorList = new ArrayList<Employee>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user