use of com.microsoft.graph.http.IHttpProvider in project msgraph-sdk-java by microsoftgraph.
the class GraphServiceClientTest method testOverrideOfHttpSerializer.
@Test
public void testOverrideOfHttpSerializer() {
IHttpProvider hp = new IHttpProvider() {
@Override
public ISerializer getSerializer() {
return null;
}
@Override
public <Result, BodyType> void send(IHttpRequest request, ICallback<Result> callback, Class<Result> resultClass, BodyType serializable) {
// do nothing
}
@Override
public <Result, BodyType> Result send(IHttpRequest request, Class<Result> resultClass, BodyType serializable) throws ClientException {
return null;
}
@Override
public <Result, BodyType, DeserializeType> Result send(IHttpRequest request, Class<Result> resultClass, BodyType serializable, IStatefulResponseHandler<Result, DeserializeType> handler) throws ClientException {
return null;
}
};
IGraphServiceClient client = //
GraphServiceClient.builder().authenticationProvider(//
auth).httpProvider(//
hp).buildClient();
assertEquals(hp, client.getHttpProvider());
assertEquals(auth, client.getAuthenticationProvider());
assertNotNull(client.getSerializer());
assertNotNull(client.getLogger());
assertNotNull(client.getExecutors());
}
Aggregations