From 900b06228d22f24b38788292a3f0dee980dd2fa5 Mon Sep 17 00:00:00 2001 From: Tom Vahlman <tom@dsv.su.se> Date: Fri, 2 Mar 2012 10:05:27 +0100 Subject: [PATCH] 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. --- .../match/TestGreedyMatchingAlgorithm.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/java/se/su/dsv/scipro/match/TestGreedyMatchingAlgorithm.java b/src/test/java/se/su/dsv/scipro/match/TestGreedyMatchingAlgorithm.java index a6cdcaf326..c4c8279cb3 100644 --- a/src/test/java/se/su/dsv/scipro/match/TestGreedyMatchingAlgorithm.java +++ b/src/test/java/se/su/dsv/scipro/match/TestGreedyMatchingAlgorithm.java @@ -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 @Test @Transactional @Rollback - /* 1. + /* Test 1. * ================================================================================== * * Prerequisites: two supervisors are matched against one bachelor project idea, @@ -516,7 +516,7 @@ public class TestGreedyMatchingAlgorithm { @Transactional @Rollback /* . - * 2. + * Test 2. * ================================================================================== * Prerequisites: two supervisors are matched against one bachelor project idea, * both supervisors have the SAME "total availability" (9) @@ -556,7 +556,7 @@ public class TestGreedyMatchingAlgorithm { @Test @Transactional @Rollback - /* 3. + /* Test 3. * ================================================================================== * Prerequisites: two supervisors are matched against one bachelor project idea, * both supervisors have "open" availability slots for both master and bachelor projects @@ -596,11 +596,11 @@ public class TestGreedyMatchingAlgorithm { @Test @Transactional @Rollback - /* three supervisors are matched against three project ideas - * tests that project classes are regarded when matching project ideas and supervisors - * when available slots are exactly the same - * this test, which may be a duplicate, is done only to test if the matching algorithm can handle a more "complicated" match - * */ + /* Test 4 + * ============================================================================================= + * The test verifies that project classes are regarded when sorting matched Pairs (containing a project idea and a supervisor) + * The test also verifies that the matching algorithm can handle more "complicated" match situations. + * */ public void testThreeSupervisorsAndThreeProjectIdeas_Available_Slots_Are_The_Same() { List<ProjectIdea> projectIdeaList = new ArrayList<ProjectIdea>(); List<Employee> supervisorList = new ArrayList<Employee>();