PageRenderTime 40ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/aws-java-sdk-marketplacecommerceanalytics/src/test/java/com/amazonaws/services/marketplacecommerceanalytics/smoketests/AWSMarketplaceCommerceAnalyticsModuleInjector.java

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