PageRenderTime 1686ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/aws-java-sdk-applicationautoscaling/src/test/java/com/amazonaws/services/applicationautoscaling/smoketests/AWSApplicationAutoScalingModuleInjector.java

https://gitlab.com/github-cloud-corp/aws-sdk-java
Java | 48 lines | 23 code | 7 blank | 18 comment | 0 complexity | 2f6bfc1e54a290b5d8505883b3ad5209 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.applicationautoscaling.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.applicationautoscaling.AWSApplicationAutoScalingClient;
  24. /**
  25. * Injector that binds the AmazonWebServiceClient interface to the
  26. * com.amazonaws.services.applicationautoscaling.AWSApplicationAutoScalingClient
  27. */
  28. public class AWSApplicationAutoScalingModuleInjector implements InjectorSource {
  29. @Override
  30. public Injector getInjector() {
  31. return Guice.createInjector(Stage.PRODUCTION, CucumberModules.SCENARIO,
  32. new AWSApplicationAutoScalingModule());
  33. }
  34. static class AWSApplicationAutoScalingModule extends AbstractModule {
  35. @Override
  36. protected void configure() {
  37. bind(AmazonWebServiceClient.class).to(
  38. AWSApplicationAutoScalingClient.class);
  39. }
  40. }
  41. }