Java 类com.amazonaws.services.elasticbeanstalk.model.DescribeApplicationVersionsResult 实例源码

项目:jcabi-beanstalk-maven-plugin    文件:OverridingVersionTest.java   
/**
 * OverridingVersion can override a version in AWS EBT.
 * @throws Exception If something is wrong
 */
@Test
public void overridesVersionInEbt() throws Exception {
    final String app = "some-app";
    final String key = "some-bundle-key";
    final Bundle bundle = Mockito.mock(Bundle.class);
    Mockito.doReturn(key).when(bundle).name();
    final AWSElasticBeanstalk ebt = Mockito.mock(AWSElasticBeanstalk.class);
    Mockito.doReturn(new DescribeApplicationVersionsResult())
        .when(ebt).describeApplicationVersions(
            Mockito.any(DescribeApplicationVersionsRequest.class)
        );
    Mockito.doReturn(
        new CreateApplicationVersionResult()
            .withApplicationVersion(
                new ApplicationVersionDescription()
                    .withVersionLabel(key)
        )
    ).when(ebt)
        .createApplicationVersion(
            Mockito.any(CreateApplicationVersionRequest.class)
        );
    final Version version = new OverridingVersion(ebt, app, bundle);
    MatcherAssert.assertThat(
        version.label(),
        Matchers.equalTo(key)
    );
}
项目:elasticbeanstalk-dashboard    文件:ElasticBeanstalkService.java   
public List<ApplicationVersionDescription> getVersions(String applicationName){
    DescribeApplicationVersionsRequest request = new DescribeApplicationVersionsRequest().withApplicationName(applicationName);
    DescribeApplicationVersionsResult result = awsElasticBeanstalkAsyncClient.describeApplicationVersions(request);
    return result.getApplicationVersions();
}