public void logoutOnTenant() throws BonitaException { getApiClient().logout(); }
public void deployCommandsOnDefaultTenant() throws BonitaException { APIClient apiClient = new APIClient(); apiClient.login(DEFAULT_TECHNICAL_LOGGER_USERNAME, DEFAULT_TECHNICAL_LOGGER_PASSWORD); ClientEventUtil.deployCommand(apiClient.getSession()); apiClient.logout(); }
@Test public void should_logout_destroy_session() throws LoginException, LogoutException { client.login(VALID_USERNAME, VALID_PASSWORD); assertThat(client.getSession()).isNotNull(); client.logout(); assertThat(client.getSession()).isNull(); }
@Test public void should_throw_exception_when_accessing_api_after_logout() throws LoginException, LogoutException { client.login(VALID_USERNAME, VALID_PASSWORD); client.logout(); expectedEx.expect(IllegalStateException.class); expectedEx.expectMessage("You must call login() prior to accessing any API."); client.getProcessAPI(); }