Search in sources :

Example 1 with AdManagerModule

use of com.google.api.ads.admanager.lib.AdManagerModule in project googleads-java-lib by googleads.

the class AdManagerLibConfigurationIntegrationTest method testPropertyFileIncludedInConfig.

@Test
public void testPropertyFileIncludedInConfig() throws Exception {
    File adsPropertiesFile = createPropertiesFile();
    System.setProperty("user.home", adsPropertiesFile.getParentFile().getAbsolutePath());
    AdManagerLibConfiguration config = Guice.createInjector(new AdManagerModule()).getInstance(AdManagerLibConfiguration.class);
    assertFalse(config.isAutoRefreshOAuth2TokenEnabled());
}
Also used : AdManagerModule(com.google.api.ads.admanager.lib.AdManagerModule) File(java.io.File) Test(org.junit.Test)

Example 2 with AdManagerModule

use of com.google.api.ads.admanager.lib.AdManagerModule in project googleads-java-lib by googleads.

the class AdManagerAxisModule method configure.

@Override
public void configure() {
    bind(new TypeLiteral<HeaderHandler<AdManagerSession, AdManagerServiceDescriptor>>() {
    }).to(new TypeLiteral<AdManagerAxisHeaderHandler>() {
    });
    install(new AxisModule());
    install(new AdManagerModule());
    install(new AdManagerSoapModule());
    configureConfigurations(this.getClass().getResource("conf/props/build.properties"));
}
Also used : AdManagerServiceDescriptor(com.google.api.ads.admanager.lib.client.AdManagerServiceDescriptor) TypeLiteral(com.google.inject.TypeLiteral) AdManagerModule(com.google.api.ads.admanager.lib.AdManagerModule) AdManagerSoapModule(com.google.api.ads.admanager.lib.AdManagerSoapModule) AdManagerSession(com.google.api.ads.admanager.lib.client.AdManagerSession) AxisModule(com.google.api.ads.common.lib.soap.axis.AxisModule)

Example 3 with AdManagerModule

use of com.google.api.ads.admanager.lib.AdManagerModule in project googleads-java-lib by googleads.

the class AdManagerJaxWsModule method configure.

@Override
public void configure() {
    bind(new TypeLiteral<HeaderHandler<AdManagerSession, AdManagerServiceDescriptor>>() {
    }).to(new TypeLiteral<AdManagerJaxWsHeaderHandler>() {
    });
    install(new JaxWsModule());
    install(new AdManagerModule());
    install(new AdManagerSoapModule());
    configureConfigurations(this.getClass().getResource("conf/props/build.properties"));
}
Also used : AdManagerServiceDescriptor(com.google.api.ads.admanager.lib.client.AdManagerServiceDescriptor) TypeLiteral(com.google.inject.TypeLiteral) AdManagerModule(com.google.api.ads.admanager.lib.AdManagerModule) AdManagerSoapModule(com.google.api.ads.admanager.lib.AdManagerSoapModule) AdManagerSession(com.google.api.ads.admanager.lib.client.AdManagerSession) JaxWsModule(com.google.api.ads.common.lib.soap.jaxws.JaxWsModule)

Aggregations

AdManagerModule (com.google.api.ads.admanager.lib.AdManagerModule)3 AdManagerSoapModule (com.google.api.ads.admanager.lib.AdManagerSoapModule)2 AdManagerServiceDescriptor (com.google.api.ads.admanager.lib.client.AdManagerServiceDescriptor)2 AdManagerSession (com.google.api.ads.admanager.lib.client.AdManagerSession)2 TypeLiteral (com.google.inject.TypeLiteral)2 AxisModule (com.google.api.ads.common.lib.soap.axis.AxisModule)1 JaxWsModule (com.google.api.ads.common.lib.soap.jaxws.JaxWsModule)1 File (java.io.File)1 Test (org.junit.Test)1