Search in sources :

Example 1 with AbstractDynamoDbProperties

use of org.apereo.cas.configuration.model.support.dynamodb.AbstractDynamoDbProperties in project cas by apereo.

the class AmazonClientConfigurationBuilderTests method verifyOperation.

@Test
public void verifyOperation() {
    val properties = new AbstractDynamoDbProperties() {

        private static final long serialVersionUID = -3599433486448467450L;
    };
    properties.setLocalAddress("github.com");
    properties.setEndpoint("http://localhost:4532");
    properties.setProxyHost("http://localhost:8080");
    val httpClientBuilder = mock(SampleClientBuilder.class);
    val clientBuilder = mock(AwsSyncClientBuilder.class);
    when(clientBuilder.httpClientBuilder(any())).thenReturn(httpClientBuilder);
    assertDoesNotThrow(() -> AmazonClientConfigurationBuilder.prepareClientBuilder(clientBuilder, StaticCredentialsProvider.create(AwsBasicCredentials.create("key", "secret")), properties));
}
Also used : lombok.val(lombok.val) AbstractDynamoDbProperties(org.apereo.cas.configuration.model.support.dynamodb.AbstractDynamoDbProperties) Test(org.junit.jupiter.api.Test)

Example 2 with AbstractDynamoDbProperties

use of org.apereo.cas.configuration.model.support.dynamodb.AbstractDynamoDbProperties in project cas by apereo.

the class AmazonDynamoDbClientFactoryTests method verifyAction.

@Test
public void verifyAction() {
    val factory = new AmazonDynamoDbClientFactory();
    val properties = new AbstractDynamoDbProperties() {

        private static final long serialVersionUID = -3599433486448467450L;
    };
    properties.setRegion(Region.US_EAST_1.id());
    val client = factory.createAmazonDynamoDb(properties);
    assertNotNull(client);
}
Also used : lombok.val(lombok.val) AbstractDynamoDbProperties(org.apereo.cas.configuration.model.support.dynamodb.AbstractDynamoDbProperties) Test(org.junit.jupiter.api.Test)

Aggregations

lombok.val (lombok.val)2 AbstractDynamoDbProperties (org.apereo.cas.configuration.model.support.dynamodb.AbstractDynamoDbProperties)2 Test (org.junit.jupiter.api.Test)2