Ejemplo n.º 1
0
 @Override
 protected int targetFacetCount() {
   Map<Integer, Collection<Spell>> levelMap = knownSpellFacet.getKnownSpells(id, wizardSpellList);
   if (levelMap.isEmpty()) {
     return 0;
   }
   Collection<Spell> spells = levelMap.get(2);
   return (spells == null) ? 0 : spells.size();
 }
Ejemplo n.º 2
0
 @Override
 protected boolean containsExpected() {
   // Cannot use contains because facet is using instance identity
   Map<Integer, Collection<Spell>> levelMap = knownSpellFacet.getKnownSpells(id, wizardSpellList);
   int size = levelMap.size();
   if (size != 1) {
     System.err.println("Size Incorrect");
     return false;
   }
   Collection<Spell> spells = levelMap.get(2);
   if (spells.size() != 1) {
     System.err.println("Spell Size Incorrect");
     return false;
   }
   return spells.contains(fb);
 }