use of cz.metacentrum.perun.cabinet.model.Category in project perun by CESNET.
the class CategoryManagerIntegrationTest method getCategoryByIdTest.
@Test
public void getCategoryByIdTest() throws Exception {
System.out.println("CategoryManagerIntegrationTest.getCategoryByIdTest");
Category c2 = getCabinetManager().getCategoryById(c1.getId());
assertEquals("Original and retrieved Category by ID: " + c1.getId() + " are not same.", c1, c2);
}
use of cz.metacentrum.perun.cabinet.model.Category in project perun by CESNET.
the class CategoryManagerIntegrationTest method deleteCategoryWhenNotExistTest.
@Test(expected = CabinetException.class)
public void deleteCategoryWhenNotExistTest() throws Exception {
System.out.println("CategoryManagerIntegrationTest.deleteCategoryWhenNotExistTest");
getCabinetManager().deleteCategory(sess, new Category(0, "test", 1.0));
// should throw exception
}
use of cz.metacentrum.perun.cabinet.model.Category in project perun by CESNET.
the class CategoryManagerBlImpl method createCategory.
// methods ----------------------
@Override
public Category createCategory(PerunSession sess, Category category) throws CabinetException {
Category newCategory = getCategoryManagerDao().createCategory(sess, category);
log.debug("{} created.", newCategory);
return newCategory;
}
Aggregations