394041424344454647
public class TestCollectionValue extends AbstractProfileTest { public void testNoProfile() throws Exception { XMLCollection xc = getConfiguredCollection(); Collection coll = xc.getCollection(); assertEquals(1, coll.size()); }
525354555657585960
assertEquals(Arrays.asList("manager"), l); } public void testFooProfile() throws Exception { XMLCollection xc = getConfiguredCollection("foo"); Collection coll = xc.getCollection(); assertEquals(3, coll.size()); }
656667686970717273
assertEquals(Arrays.asList("manager", "foo_manager", "foo_bar_manager"), l); } public void testBarProfile() throws Exception { XMLCollection xc = getConfiguredCollection("bar"); Collection coll = xc.getCollection(); assertEquals(2, coll.size()); }
787980818283848586
assertEquals(Arrays.asList("manager", "foo_bar_manager"), l); } public void testFooBarProfile() throws Exception { XMLCollection xc = getConfiguredCollection("foo", "bar"); Collection coll = xc.getCollection(); assertEquals(3, coll.size()); }
3839404142434445
public class TestField extends AbstractProfileTest { public void testNoProfile() throws Exception { XMLCollection xc = getConfiguredCollection(); assertEquals(Arrays.asList("manager"), xc.getCollection()); }
5051525354555657
assertEquals(Arrays.asList("manager"), l); } public void testFooProfile() throws Exception { XMLCollection xc = getConfiguredCollection("foo"); assertEquals(Arrays.asList("foo_manager"), xc.getCollection()); }
6263646566676869
assertEquals(Arrays.asList("foo_manager"), l); } public void testBarProfile() throws Exception { XMLCollection xc = getConfiguredCollection("bar"); assertEquals(Arrays.asList("foo_bar_manager"), xc.getCollection()); }
7475767778798081
assertEquals(Arrays.asList("foo_bar_manager"), l); } public void testFooBarProfile() throws Exception { XMLCollection xc = getConfiguredCollection("foo", "bar"); assertEquals(Arrays.asList("foo_manager"), xc.getCollection()); }
90919293949596979899100
private void createCollection() throws Exception { try { connect(); // check if there is an object there already in that case delete it // we assume we are cleaning up after an usuccessful testrun XMLCollection test = (XMLCollection)db.objectForName(collectionName); if (test != null) { deleteCollection(); connect(); } // create a new Collection
113114115116117118119120121122123124
} } public void deleteCollection() { try { connect(); XMLCollection collection = (XMLCollection)db.objectForName(collectionName); Iterator it = collection.getResources().iterator(); while (it.hasNext()) { XMLContainer.forName(db,(String)it.next()).delete(); } db.deleteObject(collection); System.out.println("StoreDocument.deleteCollection() - deleted " + collectionName);