Examples of AWSInstanceApi


Examples of org.jclouds.aws.ec2.features.AWSInstanceApi

   @SuppressWarnings("unchecked")
   @Test
   public void testWhenInstancesPresentSingleCall() {

      AWSEC2Api client = createMock(AWSEC2Api.class);
      AWSInstanceApi instanceApi = createMock(AWSInstanceApi.class);
      Function<SpotInstanceRequest, AWSRunningInstance> converter = createMock(Function.class);

      expect(client.getInstanceApi()).andReturn((Optional) Optional.of(instanceApi));
     
      // avoid imatcher fail.  if you change this, be sure to check multiple jres
      expect(instanceApi.describeInstancesInRegion("us-east-1", "i-aaaa", "i-bbbb")).andReturn(
            Set.class.cast(ImmutableSet.of(Reservation.<AWSRunningInstance> builder().region("us-east-1")
                  .instances(ImmutableSet.of(instance1, instance2)).build())));

      replay(client, instanceApi, converter);
View Full Code Here

Examples of org.jclouds.aws.ec2.features.AWSInstanceApi

   @SuppressWarnings("unchecked")
   @Test
   public void testWhenInstancesPresentSingleCall() {

      AWSEC2Api client = createMock(AWSEC2Api.class);
      AWSInstanceApi instanceApi = createMock(AWSInstanceApi.class);
      Function<SpotInstanceRequest, AWSRunningInstance> converter = createMock(Function.class);

      expect(client.getInstanceApi()).andReturn((Optional) Optional.of(instanceApi));
     
      // avoid imatcher fail.  if you change this, be sure to check multiple jres
      expect(instanceApi.describeInstancesInRegion("us-east-1", "i-aaaa", "i-bbbb")).andReturn(
            Set.class.cast(ImmutableSet.of(Reservation.<AWSRunningInstance> builder().region("us-east-1")
                  .instances(ImmutableSet.of(instance1, instance2)).build())));

      replay(client, instanceApi, converter);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.