use of com.google.api.ads.common.lib.soap.jaxws.testing.mocks.CampaignServiceInterfaceImpl in project googleads-java-lib by googleads.
the class JaxWsHandlerTest method testInvokeSoapCall.
@Test
public void testInvokeSoapCall() throws SecurityException, NoSuchMethodException {
CampaignServiceInterface soapClient = new CampaignServiceInterfaceImpl();
Method soapCallMethod = CampaignServiceInterface.class.getMethod("getTestMessage", new Class<?>[0]);
SoapCall<BindingProvider> soapCall = new SoapCall<BindingProvider>(soapCallMethod, soapClient, new Object[0]);
RemoteCallReturn returnedValue = jaxWsHandler.invokeSoapCall(soapCall);
assertEquals("Here!", returnedValue.getReturnValue());
assertEquals(null, returnedValue.getException());
assertEquals(CampaignServiceInterfaceImpl.endpointAddress, returnedValue.getRequestInfo().getUrl());
}
use of com.google.api.ads.common.lib.soap.jaxws.testing.mocks.CampaignServiceInterfaceImpl in project googleads-java-lib by googleads.
the class JaxWsHandlerTest method testCreateSoapClient.
@Test
public void testCreateSoapClient() {
SoapServiceDescriptor serviceDescriptor = new MockJaxWsCompatibleDescriptor();
BindingProvider provider = jaxWsHandler.createSoapClient(serviceDescriptor);
assertTrue(provider instanceof CampaignServiceInterfaceImpl);
assertTrue(provider.getBinding().getHandlerChain().get(0) instanceof JaxWsSoapContextHandler);
}
Aggregations