Пример #1
0
  @Test
  public void countNeededSkills() {
    skillTestUtil.createTaxonomy();

    int noOpps = 5;

    SkillCategory root = skillStore.findRoot();
    oppTestUtil.createOpps(
        noOpps,
        new Date(),
        DEFAULT_HEAD_COUNT,
        root.getSubCategories().toArray(new SkillCategory[root.getSubCategories().size()]));

    int actualHeadCount = oppStore.getTotalHeadCountBySkill(root.getSubCategories().get(0));

    assertEquals(noOpps * DEFAULT_HEAD_COUNT, actualHeadCount);
  }
 public void addEmbeddedLinks(
     Representation representation, SkillCategory skill, NodeEnricher nodeEnricher) {
   for (SkillCategory child : skill.getSubCategories()) {
     Representation embedded = createWithName(child, nodeEnricher);
     addEmbeddedLinks(embedded, child, nodeEnricher);
     representation.withRepresentation("children", embedded);
   }
 }