use of com.blackducksoftware.integration.log.Slf4jIntLogger in project hub-alert by blackducksoftware.
the class LoginActionsTestIT method testIsUserValidFailIT.
@Test
public void testIsUserValidFailIT() throws IntegrationException, IOException {
final LoginRestModel loginRestModel = mockLoginRestModel.createRestModel();
final GlobalProperties globalProperties = new TestGlobalProperties();
final HubServerConfigBuilder serverConfigBuilder = new HubServerConfigBuilder();
serverConfigBuilder.setLogger(new Slf4jIntLogger(logger));
serverConfigBuilder.setHubUrl(globalProperties.getHubUrl());
serverConfigBuilder.setAlwaysTrustServerCertificate(globalProperties.getHubTrustCertificate());
serverConfigBuilder.setTimeout(globalProperties.getHubTimeout());
serverConfigBuilder.setPassword(loginRestModel.getHubPassword());
serverConfigBuilder.setUsername(loginRestModel.getHubUsername());
final LoginActions loginActions = new LoginActions(globalProperties);
final RestConnection restConnection = loginActions.createRestConnection(serverConfigBuilder);
final boolean roleValid = loginActions.isUserRoleValid("broken", restConnection);
assertFalse(roleValid);
}
Aggregations