Package org.jclouds.rest.internal

Examples of org.jclouds.rest.internal.GeneratedHttpRequest


@Test(groups = "unit", testName = "BrowsingAsyncApiTest")
public class BrowsingAsyncApiTest extends BaseVPDCAsyncApiTest<BrowsingAsyncApi> {

   public void testOrg() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(BrowsingAsyncApi.class, "getOrg", String.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("11"));

      assertRequestLineEquals(request, "GET https://api.savvis.net/vpdc/v1.0/org/11 HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
      assertPayloadEquals(request, null, null, false);
View Full Code Here


      checkFilters(request);
   }

   public void testOrgNull() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(BrowsingAsyncApi.class, "getOrg", String.class);
      GeneratedHttpRequest request = processor.createRequest(method, Lists.<Object> newArrayList((String) null));

      assertRequestLineEquals(request, "GET https://api.savvis.net/vpdc/v1.0/org/1 HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
      assertPayloadEquals(request, null, null, false);
View Full Code Here

      checkFilters(request);
   }

   public void testVDC() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(BrowsingAsyncApi.class, "getVDCInOrg", String.class, String.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("11", "22"));

      assertRequestLineEquals(request, "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22 HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
      assertPayloadEquals(request, null, null, false);
View Full Code Here

      checkFilters(request);
   }

   public void testVDCWhenOrgNull() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(BrowsingAsyncApi.class, "getVDCInOrg", String.class, String.class);
      GeneratedHttpRequest request = processor.createRequest(method, Lists.<Object> newArrayList((String) null, "22"));

      assertRequestLineEquals(request, "GET https://api.savvis.net/vpdc/v1.0/org/1/vdc/22 HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
      assertPayloadEquals(request, null, null, false);
View Full Code Here

      checkFilters(request);
   }

   public void testNetwork() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(BrowsingAsyncApi.class, "getNetworkInVDC", String.class, String.class, String.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("11", "22", "VM-Tier01"));

      assertRequestLineEquals(request,
               "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/network/VM-Tier01 HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
      assertPayloadEquals(request, null, null, false);
View Full Code Here

      checkFilters(request);
   }

   public void testNetworkWhenOrgNull() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(BrowsingAsyncApi.class, "getNetworkInVDC", String.class, String.class, String.class);
      GeneratedHttpRequest request = processor.createRequest(method, Lists.<Object> newArrayList((String) null, "22", "VM-Tier01"));

      assertRequestLineEquals(request,
               "GET https://api.savvis.net/vpdc/v1.0/org/1/vdc/22/network/VM-Tier01 HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
      assertPayloadEquals(request, null, null, false);
View Full Code Here

   }

   public void testVMVDC() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(BrowsingAsyncApi.class, "getVMInVDC", String.class, String.class, String.class,
               GetVMOptions[].class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("11", "22", "33"));

      assertRequestLineEquals(request,
               "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33 HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
      assertPayloadEquals(request, null, null, false);
View Full Code Here

      checkFilters(request);
   }

   public void testVM() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(BrowsingAsyncApi.class, "getVM", URI.class, GetVMOptions[].class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(URI
               .create("https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33")));

      assertRequestLineEquals(request,
               "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33 HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
View Full Code Here

   }

   public void testVMWithPowerState() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(BrowsingAsyncApi.class, "getVMInVDC", String.class, String.class, String.class,
               GetVMOptions[].class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("11", "22", "VM-Tier01", GetVMOptions.Builder
               .withPowerState()));

      assertRequestLineEquals(request,
               "GET https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/VM-Tier01/withpowerstate HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
View Full Code Here

   }

   public void testVMWhenOrgNull() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(BrowsingAsyncApi.class, "getVMInVDC", String.class, String.class, String.class,
               GetVMOptions[].class);
      GeneratedHttpRequest request = processor.createRequest(method, Lists.<Object> newArrayList((String) null, "22", "VM-Tier01"));

      assertRequestLineEquals(request,
               "GET https://api.savvis.net/vpdc/v1.0/org/1/vdc/22/vApp/VM-Tier01 HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
      assertPayloadEquals(request, null, null, false);
View Full Code Here

TOP

Related Classes of org.jclouds.rest.internal.GeneratedHttpRequest

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.