kward       2002/06/17 20:36:12

  Modified:    java/scratchpad/tests/src CollectionManagerTest.java
  Log:
  added GetCollectionCount test
  
  Revision  Changes    Path
  1.5       +26 -1     
xml-xindice/java/scratchpad/tests/src/CollectionManagerTest.java
  
  Index: CollectionManagerTest.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xindice/java/scratchpad/tests/src/CollectionManagerTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CollectionManagerTest.java        12 Jun 2002 02:11:40 -0000      1.4
  +++ CollectionManagerTest.java        18 Jun 2002 03:36:11 -0000      1.5
  @@ -155,6 +155,31 @@
      }
   
   
  +   public void testGetCollectionCount() throws Exception {
  +
  +      createCollection("col1");
  +
  +      // try to get a document count
  +      Hashtable message = new Hashtable();
  +      message.put("message", "GetCollectionCount");
  +      message.put("collection", "/" + INSTANCE_NAME + "/" + 
TEST_COLLECTION_NAME);
  +
  +      Vector params = new Vector();
  +      params.addElement(message);
  +
  +      Hashtable result = new Hashtable();
  +      try {
  +         result = (Hashtable) client.execute("run", params);
  +      } catch(Exception e) {
  +         fail( e.getMessage() );
  +      }
  +
  +      assertTrue( ( (Integer) result.get("result")).intValue() == 1 );
  +
  +      dropCollection("col1");
  +
  +   }
  +
      public void testCreateIndexer() throws Exception {
         String result = null;
         // try a normal index
  
  
  

Reply via email to