Search in sources :

Example 6 with ListDomainsResult

use of com.amazonaws.services.simpledb.model.ListDomainsResult in project teiid by teiid.

the class SimpleDbAPIClassTest method getDomainsTest.

@Test
public void getDomainsTest() throws Exception {
    ListDomainsResult listDomainResult = Mockito.mock(ListDomainsResult.class);
    List<String> resultList = new ArrayList<String>();
    resultList.add("Test");
    resultList.add("Test1");
    when(client.listDomains()).thenReturn(listDomainResult);
    when(listDomainResult.getDomainNames()).thenReturn(resultList);
    assertEquals(resultList, simpleDbApi.getDomains());
}
Also used : ListDomainsResult(com.amazonaws.services.simpledb.model.ListDomainsResult) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Aggregations

ListDomainsResult (com.amazonaws.services.simpledb.model.ListDomainsResult)6 AmazonClientException (com.amazonaws.AmazonClientException)3 ListDomainsRequest (com.amazonaws.services.simpledb.model.ListDomainsRequest)3 AmazonServiceException (com.amazonaws.AmazonServiceException)1 AvailabilityZone (com.amazonaws.services.ec2.model.AvailabilityZone)1 DescribeAvailabilityZonesResult (com.amazonaws.services.ec2.model.DescribeAvailabilityZonesResult)1 DescribeInstancesResult (com.amazonaws.services.ec2.model.DescribeInstancesResult)1 DescribeSecurityGroupsResult (com.amazonaws.services.ec2.model.DescribeSecurityGroupsResult)1 Instance (com.amazonaws.services.ec2.model.Instance)1 Reservation (com.amazonaws.services.ec2.model.Reservation)1 SecurityGroup (com.amazonaws.services.ec2.model.SecurityGroup)1 Bucket (com.amazonaws.services.s3.model.Bucket)1 ObjectListing (com.amazonaws.services.s3.model.ObjectListing)1 S3ObjectSummary (com.amazonaws.services.s3.model.S3ObjectSummary)1 AmazonSimpleDB (com.amazonaws.services.simpledb.AmazonSimpleDB)1 CreateDomainRequest (com.amazonaws.services.simpledb.model.CreateDomainRequest)1 DomainMetadataRequest (com.amazonaws.services.simpledb.model.DomainMetadataRequest)1 DomainMetadataResult (com.amazonaws.services.simpledb.model.DomainMetadataResult)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1