assertTrue("ContentCategory not found by Category", found.contains(cc));
}
public void testMoveCategory() throws Exception
{
CategoryVO one = new CategoryVO();
one.setName("MoveCategoryExtraOne");
one.setDescription("Extra one description");
one.setParentId(testCategory.getId());
one = testController.save(one);
CategoryVO otherRoot = new CategoryVO();
otherRoot.setName("MoveCategoryParentExtraTwo");
otherRoot.setDescription("Extra two description");
otherRoot = testController.save(otherRoot);
extraCategories.add(otherRoot);
// test original setup
List categories = testController.findByParent(testCategory.getId());
assertTrue("Before Move - Child Category was not found by original parent", categories.contains(one));
categories = testController.findByParent(otherRoot.getId());
assertFalse("Before Move - Child Category was found by new parent", categories.contains(one));
one = testController.moveCategory(one.getId(), otherRoot.getId());
// test new setup
categories = testController.findByParent(testCategory.getId());
assertFalse("After Move - Child Category was found by old parent", categories.contains(one));
categories = testController.findByParent(otherRoot.getId());
assertTrue("After Move - Child Category was not found by new parent", categories.contains(one));
}