use of org.infobip.mobile.messaging.api.tools.DebugServer in project mobile-messaging-sdk-android by infobip.
the class MobileApiGeoTest method setUp.
@Before
public void setUp() throws Exception {
debugServer = new DebugServer();
debugServer.start();
Properties properties = new Properties();
properties.put("api.key", "my_API_key");
Generator generator = new Generator.Builder().withBaseUrl("http://127.0.0.1:" + debugServer.getListeningPort() + "/").withProperties(properties).build();
mobileApiGeo = generator.create(MobileApiGeo.class);
}
use of org.infobip.mobile.messaging.api.tools.DebugServer in project mobile-messaging-sdk-android by infobip.
the class MobileApiRegistrationTest method setUp.
@Before
public void setUp() throws Exception {
debugServer = new DebugServer();
debugServer.start();
Properties properties = new Properties();
properties.put("api.key", "my_API_key");
Generator generator = new Generator.Builder().withBaseUrl("http://127.0.0.1:" + debugServer.getListeningPort() + "/").withProperties(properties).build();
mobileApiRegistration = generator.create(MobileApiRegistration.class);
}
use of org.infobip.mobile.messaging.api.tools.DebugServer in project mobile-messaging-sdk-android by infobip.
the class MobileApiVersionTest method setUp.
@Before
public void setUp() throws Exception {
debugServer = new DebugServer();
debugServer.start();
Properties properties = new Properties();
properties.put("api.key", "my_API_key");
Generator generator = new Generator.Builder().withBaseUrl("http://127.0.0.1:" + debugServer.getListeningPort() + "/").withProperties(properties).build();
mobileApiVersion = generator.create(MobileApiVersion.class);
}
use of org.infobip.mobile.messaging.api.tools.DebugServer in project mobile-messaging-sdk-android by infobip.
the class DefaultApiClientTest method setUp.
@Before
public void setUp() throws Exception {
requestInterceptorMock = mock(RequestInterceptor.class);
responsePreProcessorMock = mock(ResponsePreProcessor.class);
when(requestInterceptorMock.intercept(any(Request.class))).thenAnswer(new Answer<Request>() {
@Override
public Request answer(InvocationOnMock invocation) throws Throwable {
return (Request) invocation.getArguments()[0];
}
});
apiClient = new DefaultApiClient(DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT, null, new RequestInterceptor[] { requestInterceptorMock }, new ResponsePreProcessor[] { responsePreProcessorMock }, new Logger());
debugServer = new DebugServer();
debugServer.start();
}
use of org.infobip.mobile.messaging.api.tools.DebugServer in project mobile-messaging-sdk-android by infobip.
the class MobileApiDataTest method setUp.
@Before
public void setUp() throws Exception {
debugServer = new DebugServer();
debugServer.start();
Properties properties = new Properties();
properties.put("api.key", "my_API_key");
Generator generator = new Generator.Builder().withBaseUrl("http://127.0.0.1:" + debugServer.getListeningPort() + "/").withProperties(properties).build();
mobileApiData = generator.create(MobileApiData.class);
}
Aggregations