PageRenderTime 148ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/aws-java-sdk-elasticloadbalancing/src/test/java/com/amazonaws/services/elasticloadbalancing/smoketests/AmazonElasticLoadBalancingModuleInjector.java

https://gitlab.com/github-cloud-corp/aws-sdk-java
Java | 48 lines | 23 code | 7 blank | 18 comment | 0 complexity | 37f84ae1402004af987240ef7ddc6fc9 MD5 | raw file
  1. /*
  2. * Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"). You may not
  5. * use this file except in compliance with the License. A copy of the License is
  6. * located at
  7. *
  8. * http://aws.amazon.com/apache2.0
  9. *
  10. * or in the "license" file accompanying this file. This file is distributed on
  11. * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  12. * express or implied. See the License for the specific language governing
  13. * permissions and limitations under the License.
  14. */
  15. package com.amazonaws.services.elasticloadbalancing.smoketests;
  16. import com.google.inject.AbstractModule;
  17. import com.google.inject.Guice;
  18. import com.google.inject.Injector;
  19. import com.google.inject.Stage;
  20. import cucumber.api.guice.CucumberModules;
  21. import cucumber.runtime.java.guice.InjectorSource;
  22. import com.amazonaws.AmazonWebServiceClient;
  23. import com.amazonaws.services.elasticloadbalancing.AmazonElasticLoadBalancingClient;
  24. /**
  25. * Injector that binds the AmazonWebServiceClient interface to the
  26. * com.amazonaws.services.elasticloadbalancing.AmazonElasticLoadBalancingClient
  27. */
  28. public class AmazonElasticLoadBalancingModuleInjector implements InjectorSource {
  29. @Override
  30. public Injector getInjector() {
  31. return Guice.createInjector(Stage.PRODUCTION, CucumberModules.SCENARIO,
  32. new AmazonElasticLoadBalancingModule());
  33. }
  34. static class AmazonElasticLoadBalancingModule extends AbstractModule {
  35. @Override
  36. protected void configure() {
  37. bind(AmazonWebServiceClient.class).to(
  38. AmazonElasticLoadBalancingClient.class);
  39. }
  40. }
  41. }