public void testDomainIdStatic() { ListServiceOfferingsOptions options = domainId("6"); assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid")); }
public void testIdStatic() { ListServiceOfferingsOptions options = id("6"); assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id")); }
public void testNameStatic() { ListServiceOfferingsOptions options = name("name"); assertEquals(ImmutableList.of("name"), options.buildQueryParameters().get("name")); }
public void testListServiceOfferings() throws Exception { Set<ServiceOffering> response = client.getOfferingApi().listServiceOfferings(); assert null != response; long offeringCount = response.size(); assertTrue(offeringCount >= 0); for (ServiceOffering offering : response) { ServiceOffering newDetails = Iterables.getOnlyElement(client.getOfferingApi().listServiceOfferings( ListServiceOfferingsOptions.Builder.id(offering.getId()))); assertEquals(offering, newDetails); assert offering.getId() != null : offering; assert offering.getName() != null : offering; assert offering.getDisplayText() != null : offering; assert offering.getCpuNumber() > 0 : offering; assert offering.getCpuSpeed() > 0 : offering; assert offering.getMemory() > 0 : offering; assert offering.getStorageType() != null && StorageType.UNRECOGNIZED != offering.getStorageType() : offering; assert offering.getTags() != null : offering; } }
public void testListServiceOfferings() throws Exception { Set<ServiceOffering> response = client.getOfferingClient().listServiceOfferings(); assert null != response; long offeringCount = response.size(); assertTrue(offeringCount >= 0); for (ServiceOffering offering : response) { ServiceOffering newDetails = Iterables.getOnlyElement(client.getOfferingClient().listServiceOfferings( ListServiceOfferingsOptions.Builder.id(offering.getId()))); assertEquals(offering, newDetails); assert offering.getId() != null : offering; assert offering.getName() != null : offering; assert offering.getDisplayText() != null : offering; assert offering.getCpuNumber() > 0 : offering; assert offering.getCpuSpeed() > 0 : offering; assert offering.getMemory() > 0 : offering; assert offering.getStorageType() != null && StorageType.UNRECOGNIZED != offering.getStorageType() : offering; assert offering.getTags() != null : offering; } }
public void testListServiceOfferingsOptions() throws SecurityException, NoSuchMethodException, IOException { Invokable<?, ?> method = method(OfferingApi.class, "listServiceOfferings", ListServiceOfferingsOptions[].class); GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(ListServiceOfferingsOptions.Builder.virtualMachineId("4") .domainId("5").id("6"))); assertRequestLineEquals( httpRequest, "GET http://localhost:8080/client/api?response=json&command=listServiceOfferings&listAll=true&virtualmachineid=4&domainid=5&id=6 HTTP/1.1"); assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n"); assertPayloadEquals(httpRequest, null, null, false); assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class); assertSaxResponseParserClassEquals(method, null); assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class); checkFilters(httpRequest); }
public void testListServiceOfferingsOptions() throws SecurityException, NoSuchMethodException, IOException { Invokable<?, ?> method = method(OfferingAsyncClient.class, "listServiceOfferings", ListServiceOfferingsOptions[].class); GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(ListServiceOfferingsOptions.Builder.virtualMachineId("4") .domainId("5").id("6"))); assertRequestLineEquals( httpRequest, "GET http://localhost:8080/client/api?response=json&command=listServiceOfferings&listAll=true&virtualmachineid=4&domainid=5&id=6 HTTP/1.1"); assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n"); assertPayloadEquals(httpRequest, null, null, false); assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class); assertSaxResponseParserClassEquals(method, null); assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class); checkFilters(httpRequest); }
public void testVirtualMachineIdStatic() { ListServiceOfferingsOptions options = virtualMachineId("6"); assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("virtualmachineid")); } }
public void testNameStatic() { ListServiceOfferingsOptions options = name("name"); assertEquals(ImmutableList.of("name"), options.buildQueryParameters().get("name")); }
public void testIdStatic() { ListServiceOfferingsOptions options = id("6"); assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id")); }
public void testVirtualMachineIdStatic() { ListServiceOfferingsOptions options = virtualMachineId("6"); assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("virtualmachineid")); } }
public void testDomainIdStatic() { ListServiceOfferingsOptions options = domainId("6"); assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid")); }