Skip to content

Commit

Permalink
refactor: Remove unnecessary throws declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoms committed Dec 21, 2024
1 parent 2cdcf4a commit 4a83b00
Show file tree
Hide file tree
Showing 21 changed files with 45 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakConfigureAdminGroupAndUsePathAsId.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.configureAdminGroupAndUsePathAsId.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakConfigureAdminGroupAsPath.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.configureAdminGroupAsPath.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakConfigureAdminGroupAsPathAndUsePathAsId.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.configureAdminGroupAsPathAndUsePathAsId.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakConfigureAdminGroupTest.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.configureAdminGroup.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakConfigureAdminUserIdAndUseMailAsIdTest.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.configureAdminUserIdAndUseMailAsId.cfg.xml");
configureKeycloakIdentityProviderPlugin(config).setAdministratorUserId(userIdOperatonAdmin);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakConfigureAdminUserIdAndUseUsernameAsIdTest.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.configureAdminUserIdAndUseUsernameAsId.cfg.xml");
configureKeycloakIdentityProviderPlugin(config).setAdministratorUserId(userIdOperatonAdmin);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakConfigureAdminUserIdAsUsernameAndUseMailAsIdTest.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.configureAdminUserIdAsUsernameAndUseMailAsId.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakConfigureAdminUserIdAsUsernameAndUseUsernameAsIdTest.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.configureAdminUserIdAsUsernameAndUseUsernameAsId.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakConfigureAdminUserIdAsUsernameSimilarToClientName.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.configureAdminUserIdAsUsernameSimilarToClientName.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakConfigureAdminUserIdAsUsernameTest.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.configureAdminUserIdAsUsername.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakConfigureAdminUserIdTest.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.configureAdminUserId.cfg.xml");
configureKeycloakIdentityProviderPlugin(config).setAdministratorUserId(userIdOperatonAdmin);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakUserQueryTestWithCaching.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.enableCaching.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import junit.extensions.TestSetup;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.json.JSONException;
import org.operaton.bpm.engine.ProcessEngineConfiguration;
import org.operaton.bpm.engine.identity.Group;
import org.operaton.bpm.engine.identity.User;
Expand All @@ -26,7 +27,7 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakMassDataTest.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() throws JSONException {
// setup Keycloak mass data test users
// -------------------------------------
HttpHeaders headers = authenticateKeycloakAdmin();
Expand Down Expand Up @@ -65,7 +66,7 @@ protected void setUp() throws Exception {
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() throws JSONException {
// tear down process engine
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import junit.extensions.TestSetup;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.json.JSONException;
import org.operaton.bpm.engine.ProcessEngineConfiguration;
import org.operaton.bpm.engine.identity.Group;
import org.operaton.bpm.engine.identity.User;
Expand All @@ -25,7 +26,7 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakMaxResultSizeTest.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() throws JSONException {
// setup Keycloak mass data test users
// -------------------------------------
HttpHeaders headers = authenticateKeycloakAdmin();
Expand All @@ -51,7 +52,7 @@ protected void setUp() throws Exception {
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() throws JSONException {
// tear down process engine
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakUseGroupPathdAsGroupIdQueryTest.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.useGroupPathAsOperatonGroupId.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakUseKeycloakIdAsUserIdQueryTest.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.useKeycloakIdAsOperatonUserId.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import junit.extensions.TestSetup;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.json.JSONException;
import org.operaton.bpm.engine.ProcessEngineConfiguration;
import org.operaton.bpm.engine.identity.Group;
import org.operaton.bpm.engine.identity.User;
Expand All @@ -25,7 +26,7 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakUseUsernameAsUserIdQueryTest.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() throws JSONException {
// setup Keycloak special test users
// -------------------------------------
HttpHeaders headers = authenticateKeycloakAdmin();
Expand All @@ -39,7 +40,7 @@ protected void setUp() throws Exception {
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() throws JSONException {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ public void testFilterByFirstNameExactEmailLike() {
assertNotNull(user);
}

public void testFilterByEmail() throws Exception {
public void testFilterByEmail() {
User user = identityService.createUserQuery().userEmail("operaton@accso.de").singleResult();
assertNotNull(user);

user = identityService.createUserQuery().userEmail("non-exist*").singleResult();
assertNull(user);
}

public void testFilterByEmailLike() throws Exception {
public void testFilterByEmailLike() {
User user = identityService.createUserQuery().userEmailLike("operaton@*").singleResult();
assertNotNull(user);
user = identityService.createUserQuery().userEmailLike("operaton@%").singleResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakUserQueryTestWithCaching.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.enableCaching.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ public static Test suite() {
return new TestSetup(new TestSuite(KeycloakUserQueryTestWithCachingAndCustomCacheExpiry.class)) {

// @BeforeClass
protected void setUp() throws Exception {
protected void setUp() {
ProcessEngineConfigurationImpl config = (ProcessEngineConfigurationImpl) ProcessEngineConfiguration.createProcessEngineConfigurationFromResource(
"operaton.enableCachingAndConfigureCacheDuration.cfg.xml");
configureKeycloakIdentityProviderPlugin(config);
PluggableProcessEngineTestCase.cachedProcessEngine = config.buildProcessEngine();
}

// @AfterClass
protected void tearDown() throws Exception {
protected void tearDown() {
PluggableProcessEngineTestCase.cachedProcessEngine.close();
PluggableProcessEngineTestCase.cachedProcessEngine = null;
}
Expand Down
Loading

0 comments on commit 4a83b00

Please sign in to comment.