コード例 #1
0
 @Test
 public void testRemovePrerequisite() throws Exception {
   IGenericTrait unwanted = new ValuedTraitType(AbilityType.Athletics, 4);
   data.addPrerequisite(unwanted);
   data.removePrerequisite(unwanted);
   assertEquals(0, data.getPrerequisites().length);
   assertFalse(ArrayUtilities.containsValue(data.getPrerequisites(), unwanted));
 }
コード例 #2
0
 @Test
 public void testPrimaryPrerequisteComesFirst() throws Exception {
   IGenericTrait prerequiste = new ValuedTraitType(AbilityType.Athletics, 4);
   data.addPrerequisite(prerequiste);
   IGenericTrait primary = new ValuedTraitType(AbilityType.Awareness, 4);
   data.setPrimaryPrerequisite(primary);
   assertEquals(2, data.getPrerequisites().length);
   assertEquals(primary, data.getPrerequisites()[0]);
 }