use of software.amazon.awssdk.services.ec2.Ec2Client in project iep by Netflix.
the class AwsClientFactoryTest method newInstanceInterface.
@Test
public void newInstanceInterface() throws Exception {
AwsClientFactory factory = new AwsClientFactory(config);
EC2Client ec2 = factory.newInstance(EC2Client.class);
Assert.assertNotNull(ec2);
}
use of software.amazon.awssdk.services.ec2.Ec2Client in project iep by Netflix.
the class AwsModuleTest method createClientUsingProvider.
@Test
public void createClientUsingProvider() {
Module module = new AbstractModule() {
@Override
protected void configure() {
}
@Provides
private EC2Client providesEC2(AwsClientFactory factory) {
return factory.newInstance(EC2Client.class);
}
};
Injector injector = Guice.createInjector(module, new AwsModule());
EC2Client client = injector.getInstance(EC2Client.class);
Assert.assertNotNull(client);
}
use of software.amazon.awssdk.services.ec2.Ec2Client in project iep by Netflix.
the class AwsModuleTest method createClient.
@Test
public void createClient() {
Injector injector = Guice.createInjector(new AwsModule());
AwsClientFactory factory = injector.getInstance(AwsClientFactory.class);
EC2Client client = factory.newInstance(EC2Client.class);
Assert.assertNotNull(client);
}
Aggregations