private void verifyContains(Collection items, ContentItem content) {
   for (Iterator it = items.iterator(); it.hasNext(); ) {
     Item item = (Item) it.next();
     if (item instanceof ContentItem && item.getName().equals(content.getName())) return;
   }
   Assert.fail("content not found");
 }
Beispiel #2
0
 /* (non-Javadoc)
  * @see org.osaf.cosmo.model.copy.InterfaceCollectionItem#getChildByName(java.lang.String)
  */
 public Item getChildByName(String name) {
   for (Item child : children) {
     if (child.getName().equals(name)) return child;
   }
   return null;
 }