use of com.microsoft.graph.logger.ILogger in project msgraph-sdk-java by microsoftgraph.
the class GraphServiceClientTest method testOverrideOfDefaultLogger.
@Test
public void testOverrideOfDefaultLogger() {
ILogger logger = createLogger();
IGraphServiceClient client = //
GraphServiceClient.builder().authenticationProvider(//
auth).logger(//
logger).buildClient();
assertEquals(auth, client.getAuthenticationProvider());
assertNotNull(client.getExecutors());
assertNotNull(client.getHttpProvider());
assertNotNull(client.getLogger());
assertNotNull(client.getSerializer());
assertEquals(logger, ((DefaultHttpProvider) client.getHttpProvider()).getLogger());
assertEquals(logger, ((DefaultSerializer) client.getSerializer()).getLogger());
assertEquals(logger, ((DefaultExecutors) client.getExecutors()).getLogger());
assertEquals(logger, client.getLogger());
}
use of com.microsoft.graph.logger.ILogger in project msgraph-sdk-java by microsoftgraph.
the class DefaultClientConfigTests method testOverrideLoggerShouldNotThrow.
@Test
public void testOverrideLoggerShouldNotThrow() {
final ILogger logger = new DefaultLogger();
DefaultClientConfig config = new DefaultClientConfig() {
@Override
public ILogger getLogger() {
return logger;
}
@Override
public IAuthenticationProvider getAuthenticationProvider() {
return new MockAuthenticationProvider();
}
};
config.getExecutors();
config.getAuthenticationProvider();
config.getHttpProvider();
config.getSerializer();
config.getLogger();
}
Aggregations