Package org.jclouds.cloudstack.features

Examples of org.jclouds.cloudstack.features.OfferingClient


        assertThat(byteArrayOutputStream.toString()).contains("No option specified");
    }

    @Test
    public void testOfferingCommandsPrintsServiceOfferings() throws Exception {
        final OfferingClient offeringClient = mock(OfferingClient.class);
        when(client.getOfferingClient()).thenReturn(offeringClient);
        when(offeringClient.listServiceOfferings()).thenReturn(serviceOfferings);

        final OfferingsCommand offeringsCommand = new OfferingsCommand(defaultProviderConfig);
        offeringsCommand.setServiceOffering(true);
        offeringsCommand.doExecuteWithContext(client, out);
        out.close();
View Full Code Here


            .doesNotContain("No option");
    }

    @Test
    public void testOfferingsCommandWithAllOptions() throws Exception {
        final OfferingClient offeringClient = mock(OfferingClient.class);

        when(client.getOfferingClient()).thenReturn(offeringClient);
        when(offeringClient.listServiceOfferings()).thenReturn(serviceOfferings);
        when(offeringClient.listDiskOfferings()).thenReturn(diskOfferings);
        when(offeringClient.listNetworkOfferings()).thenReturn(networkOfferings);

        final OfferingsCommand offeringsCommand = new OfferingsCommand(defaultProviderConfig);

        offeringsCommand.setServiceOffering(true);
        offeringsCommand.setDiskOffering(true);
View Full Code Here

        assertThat(byteArrayOutputStream.toString()).contains("No option specified");
    }

    @Test
    public void testOfferingCommandsPrintsServiceOfferings() throws Exception {
        final OfferingClient offeringClient = mock(OfferingClient.class);
        when(client.getOfferingClient()).thenReturn(offeringClient);
        when(offeringClient.listServiceOfferings()).thenReturn(serviceOfferings);

        final OfferingsCommand offeringsCommand = new OfferingsCommand(defaultProviderConfig);
        offeringsCommand.setServiceOffering(true);
        offeringsCommand.doExecuteWithContext(client, out);
        out.close();
View Full Code Here

            .doesNotContain("No option");
    }

    @Test
    public void testOfferingsCommandWithAllOptions() throws Exception {
        final OfferingClient offeringClient = mock(OfferingClient.class);

        when(client.getOfferingClient()).thenReturn(offeringClient);
        when(offeringClient.listServiceOfferings()).thenReturn(serviceOfferings);
        when(offeringClient.listDiskOfferings()).thenReturn(diskOfferings);
        when(offeringClient.listNetworkOfferings()).thenReturn(networkOfferings);

        final OfferingsCommand offeringsCommand = new OfferingsCommand(defaultProviderConfig);

        offeringsCommand.setServiceOffering(true);
        offeringsCommand.setDiskOffering(true);
View Full Code Here

TOP

Related Classes of org.jclouds.cloudstack.features.OfferingClient

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.