Package org.apache.oodt.cas.filemgr.system.MockXmlRpcFileManagerClient

Examples of org.apache.oodt.cas.filemgr.system.MockXmlRpcFileManagerClient.MethodCallDetails


      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --addProductType"
                  + " --typeName " + productTypeName + " --typeDesc "
                  + productTypeDesc + " --repository " + productTypeRepo
                  + " --versionClass " + productTypeVersioner).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("addProductType", methodCallDetails.getMethodName());
      assertEquals(1, methodCallDetails.getArgs().size());
      ProductType pt = (ProductType) methodCallDetails.getArgs().get(0);
      assertEquals(productTypeName, pt.getName());
      assertEquals(productTypeDesc, pt.getDescription());
      assertEquals(productTypeRepo, pt.getProductRepositoryPath());
      assertEquals(productTypeVersioner, pt.getVersioner());
   }
View Full Code Here


   public void testDeleteProductById() {
      String productId = "TestProductId";
      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --deleteProductById"
                  + " --productId " + productId).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("removeProduct", methodCallDetails.getMethodName());
      assertEquals(1, methodCallDetails.getArgs().size());
      assertEquals(productId,
            ((Product) methodCallDetails.getArgs().get(0)).getProductId());
   }
View Full Code Here

   public void testDeleteProductByName() {
      String productName = "TestProductName";
      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --deleteProductByName"
                  + " --productName " + productName).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("removeProduct", methodCallDetails.getMethodName());
      assertEquals(1, methodCallDetails.getArgs().size());
      assertEquals(productName,
            ((Product) methodCallDetails.getArgs().get(0)).getProductName());
   }
View Full Code Here

   public void testGetCurrentTransfer() {
      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --getCurrentTransfer")
                  .split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("getCurrentFileTransfer", methodCallDetails.getMethodName());
      assertEquals(0, methodCallDetails.getArgs().size());
   }
View Full Code Here

   public void testGetCurrentTransfers() {
      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --getCurrentTransfers")
                  .split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("getCurrentFileTransfers", methodCallDetails.getMethodName());
      assertEquals(0, methodCallDetails.getArgs().size());
   }
View Full Code Here

     URL refUrl = this.getClass().getResource("/ingest/test.txt");
     String refPath = new File(refUrl.getFile()).getAbsolutePath();
      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --getFilePctTransferred"
                  + " --origRef " + refPath).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("getRefPctTransferred", methodCallDetails.getMethodName());
      assertTrue(((Reference) methodCallDetails.getArgs().get(0))
            .getOrigReference().endsWith("test.txt"));
   }
View Full Code Here

   public void testGetFirstPage() {
      String productTypeName = "ProductTypeName";
      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --getFirstPage"
                  + " --productTypeName " + productTypeName).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("getFirstPage", methodCallDetails.getMethodName());
      assertEquals(productTypeName, ((ProductType) methodCallDetails.getArgs()
            .get(0)).getName());
   }
View Full Code Here

   public void testGetLastPage() {
      String productTypeName = "ProductTypeName";
      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --getLastPage"
                  + " --productTypeName " + productTypeName).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("getLastPage", methodCallDetails.getMethodName());
      assertEquals(productTypeName, ((ProductType) methodCallDetails.getArgs()
            .get(0)).getName());
   }
View Full Code Here

      int curPage = 1;
      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --getNextPage"
                  + " --productTypeName " + productTypeName + " --curPage " + curPage)
                  .split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("getNextPage", methodCallDetails.getMethodName());
      assertEquals(productTypeName, ((ProductType) methodCallDetails.getArgs()
            .get(0)).getName());
      assertEquals(curPage,
            ((ProductPage) methodCallDetails.getArgs().get(1)).getPageNum());
   }
View Full Code Here

      int curPage = 1;
      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --getPrevPage"
                  + " --productTypeName " + productTypeName + " --curPage " + curPage)
                  .split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("getPrevPage", methodCallDetails.getMethodName());
      assertEquals(productTypeName, ((ProductType) methodCallDetails.getArgs()
            .get(0)).getName());
      assertEquals(curPage,
            ((ProductPage) methodCallDetails.getArgs().get(1)).getPageNum());
   }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.filemgr.system.MockXmlRpcFileManagerClient.MethodCallDetails

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.