예제 #1
0
 @Test
 public void testPreassignProject() throws Exception {
   s.preassignProject(testProject_1);
   s.preassignProject(s.getRandomPreference());
   assertEquals("there shouldn't be 2 preassigned project", 1, s.getOrderedPreferences().size());
   assertEquals("expect true", true, s.hasPreassignedProject());
 }
예제 #2
0
 @Test
 public void testGetRandomPreference() throws Exception {
   int seed = 123;
   int num = 1;
   List<Project> expected = TheRNG().TestRandomPreferenceUtility(preped_s, seed, num);
   TheRNG().setSeed(seed);
   Project got = preped_s.getRandomPreference();
   assertEquals("should equal", expected.get(0), got);
 }