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

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


      String transferer = "org.apache.oodt.cas.filemgr.datatransfer.InPlaceDataTransferFactory";
      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --retrieveFilesByName"
                  + " --productName " + productName + " --destination " + destination
                  + " --transferer " + transferer).split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("getProductReferences", methodCallDetails.getMethodName());
      assertEquals(productName, ((Product) methodCallDetails.getArgs().get(0)).getProductName());
   }
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

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

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

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

      String productTypeName = "TestProductType";
      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --getProductPctTransferred"
                  + " --productId " + productId + " --productTypeName " + productTypeName)
                  .split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("getProductPctTransferred",
            methodCallDetails.getMethodName());
      assertEquals(productId,
            ((Product) methodCallDetails.getArgs().get(0)).getProductId());
   }
View Full Code Here

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

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

                  + " --productName " + productName + " --productStructure "
                  + structure + " --productTypeName " + productTypeName
                  + " --metadataFile " + metadataFile + " --refs " + ref
                  + " --clientTransfer --dataTransfer " + dataTransferer)
                  .split(" "));
      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("ingestProduct", methodCallDetails.getMethodName());
      assertEquals(productName,
            ((Product) methodCallDetails.getArgs().get(0)).getProductName());
      assertEquals(structure,
            ((Product) methodCallDetails.getArgs().get(0))
                  .getProductStructure());
      assertEquals(productTypeName,
            ((Product) methodCallDetails.getArgs().get(0)).getProductType()
                  .getName());
      assertTrue(((Product) methodCallDetails.getArgs().get(0))
            .getProductReferences().get(0).getOrigReference().endsWith(ref));

      assertEquals("test.txt",
            ((Metadata) methodCallDetails.getArgs().get(1))
                  .getMetadata("Filename"));
      assertEquals("GenericFile", ((Metadata) methodCallDetails.getArgs()
            .get(1)).getMetadata("ProductType"));
      assertEquals(true, methodCallDetails.getArgs().get(2));
   }
View Full Code Here

            .run(("--url http://localhost:9000 --operation --dumpMetadata"
                  + " --productId " + productId).split(" "));

      OptionPropertyRegister.clearRegister();

      MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("getMetadata", methodCallDetails.getMethodName());
      assertEquals(productId,
            ((Product) methodCallDetails.getArgs().get(0)).getProductId());
      cmdLineUtility
            .run(("--url http://localhost:9000 --operation --dumpMetadata"
                  + " --productId " + productId + " --outputDir " + tmpFile
                  .getAbsolutePath()).split(" "));
      FileUtils.forceDelete(tmpFile);
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.