Package evolaris.mgbl.gs.datamodel

Examples of evolaris.mgbl.gs.datamodel.Category


  }
 
  public void testFindAndGetCategory(){
    Category[] categories = categoryManager.getSortedCategories();
    assertTrue("at least one category must exist for the test to succeed",categories.length >= 1);
    Category category = categoryManager.findCategory(categories[0].getCategoryname());
    assertEquals("category not found by name",categories[0].getId(),category.getId());
    Category category2 = categoryManager.getCategory(category.getId());
    assertEquals("category found by ID does not match",category.getId(),category2.getId());
  }
View Full Code Here


 
  public void testGetSortedGroups(){
    Category[] categories = categoryManager.getSortedCategories();
    assertTrue("at least one category must exist for the test to succeed",categories.length >= 1);
    for (int i = 0; i < categories.length; i++) {
      Category category = categories[i];
      CriteriaGroup[] sortedGroups = categoryManager.getSortedGroups(category);
      if (sortedGroups.length >= 2){
        assertTrue("groups not sorted",sortedGroups[0].getSortorder() <= sortedGroups[1].getSortorder());
        return;
      }
View Full Code Here

    }
    String[] categorynames = new String[categories.length];
    String[] categoryDescriptions = new String[categories.length];
    long[] categoryIds = new long[categories.length];
    for (int i = 0; i < categories.length; i++) {
      Category category = categories[i];
      categorynames[i] = category.getCategoryname();
      categoryDescriptions[i] = category.getDescription();
      categoryIds[i] = category.getId();
    }
    req.getSession().setAttribute(ATTR_CATEGORYNAMES, categorynames);
    req.getSession().setAttribute(ATTR_CATEGORY_DESCRIPTIONS, categoryDescriptions);
    req.getSession().setAttribute(ATTR_CATEGORY_IDS, categoryIds);
   
View Full Code Here

TOP

Related Classes of evolaris.mgbl.gs.datamodel.Category

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.