Remove @Test on methods in AdapterTestStrategy. These are not executed from other test classes. Having the @Test on methods in a non-empty constructor causes IntelliJ to complain

This commit is contained in:
Stian Thorgersen 2015-04-10 13:35:27 +02:00
parent a18715a774
commit f435a8c6df

View file

@ -150,7 +150,6 @@ public class AdapterTestStrategy extends ExternalResource {
} }
} }
@Test
public void testSavedPostRequest() throws Exception { public void testSavedPostRequest() throws Exception {
// test login to customer-portal which does a bearer request to customer-db // test login to customer-portal which does a bearer request to customer-db
driver.navigate().to(APP_SERVER_BASE_URL + "/input-portal"); driver.navigate().to(APP_SERVER_BASE_URL + "/input-portal");
@ -189,7 +188,6 @@ public class AdapterTestStrategy extends ExternalResource {
} }
@Test
public void testLoginSSOAndLogout() throws Exception { public void testLoginSSOAndLogout() throws Exception {
// test login to customer-portal which does a bearer request to customer-db // test login to customer-portal which does a bearer request to customer-db
driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal");
@ -246,7 +244,6 @@ public class AdapterTestStrategy extends ExternalResource {
} }
@Test
public void testServletRequestLogout() throws Exception { public void testServletRequestLogout() throws Exception {
// test login to customer-portal which does a bearer request to customer-db // test login to customer-portal which does a bearer request to customer-db
driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal");
@ -288,7 +285,6 @@ public class AdapterTestStrategy extends ExternalResource {
} }
@Test
public void testLoginSSOIdle() throws Exception { public void testLoginSSOIdle() throws Exception {
// test login to customer-portal which does a bearer request to customer-db // test login to customer-portal which does a bearer request to customer-db
driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal");
@ -322,7 +318,6 @@ public class AdapterTestStrategy extends ExternalResource {
session.close(); session.close();
} }
@Test
public void testLoginSSOIdleRemoveExpiredUserSessions() throws Exception { public void testLoginSSOIdleRemoveExpiredUserSessions() throws Exception {
// test login to customer-portal which does a bearer request to customer-db // test login to customer-portal which does a bearer request to customer-db
driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal");
@ -364,7 +359,6 @@ public class AdapterTestStrategy extends ExternalResource {
session.close(); session.close();
} }
@Test
public void testLoginSSOMax() throws Exception { public void testLoginSSOMax() throws Exception {
// test login to customer-portal which does a bearer request to customer-db // test login to customer-portal which does a bearer request to customer-db
driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal"); driver.navigate().to(APP_SERVER_BASE_URL + "/customer-portal");
@ -402,7 +396,6 @@ public class AdapterTestStrategy extends ExternalResource {
* KEYCLOAK-518 * KEYCLOAK-518
* @throws Exception * @throws Exception
*/ */
@Test
public void testNullBearerToken() throws Exception { public void testNullBearerToken() throws Exception {
Client client = ClientBuilder.newClient(); Client client = ClientBuilder.newClient();
WebTarget target = client.target(APP_SERVER_BASE_URL + "/customer-db/"); WebTarget target = client.target(APP_SERVER_BASE_URL + "/customer-db/");
@ -420,7 +413,6 @@ public class AdapterTestStrategy extends ExternalResource {
* KEYCLOAK-518 * KEYCLOAK-518
* @throws Exception * @throws Exception
*/ */
@Test
public void testBadUser() throws Exception { public void testBadUser() throws Exception {
Client client = ClientBuilder.newClient(); Client client = ClientBuilder.newClient();
UriBuilder builder = UriBuilder.fromUri(AUTH_SERVER_URL); UriBuilder builder = UriBuilder.fromUri(AUTH_SERVER_URL);
@ -440,7 +432,6 @@ public class AdapterTestStrategy extends ExternalResource {
} }
@Test
public void testVersion() throws Exception { public void testVersion() throws Exception {
Client client = ClientBuilder.newClient(); Client client = ClientBuilder.newClient();
WebTarget target = client.target(AUTH_SERVER_URL).path("version"); WebTarget target = client.target(AUTH_SERVER_URL).path("version");
@ -463,7 +454,6 @@ public class AdapterTestStrategy extends ExternalResource {
@Test
public void testAuthenticated() throws Exception { public void testAuthenticated() throws Exception {
// test login to customer-portal which does a bearer request to customer-db // test login to customer-portal which does a bearer request to customer-db
driver.navigate().to(APP_SERVER_BASE_URL + "/secure-portal"); driver.navigate().to(APP_SERVER_BASE_URL + "/secure-portal");
@ -491,7 +481,6 @@ public class AdapterTestStrategy extends ExternalResource {
* *
* @throws Throwable * @throws Throwable
*/ */
@Test
public void testSingleSessionInvalidated() throws Throwable { public void testSingleSessionInvalidated() throws Throwable {
AdapterTestStrategy browser1 = this; AdapterTestStrategy browser1 = this;
AdapterTestStrategy browser2 = new AdapterTestStrategy(AUTH_SERVER_URL, APP_SERVER_BASE_URL, keycloakRule); AdapterTestStrategy browser2 = new AdapterTestStrategy(AUTH_SERVER_URL, APP_SERVER_BASE_URL, keycloakRule);
@ -529,7 +518,6 @@ public class AdapterTestStrategy extends ExternalResource {
/** /**
* KEYCLOAK-741 * KEYCLOAK-741
*/ */
@Test
public void testSessionInvalidatedAfterFailedRefresh() throws Throwable { public void testSessionInvalidatedAfterFailedRefresh() throws Throwable {
final AtomicInteger origTokenLifespan = new AtomicInteger(); final AtomicInteger origTokenLifespan = new AtomicInteger();
@ -581,7 +569,6 @@ public class AdapterTestStrategy extends ExternalResource {
/** /**
* KEYCLOAK-942 * KEYCLOAK-942
*/ */
@Test
public void testAdminApplicationLogout() throws Throwable { public void testAdminApplicationLogout() throws Throwable {
// login as bburke // login as bburke
loginAndCheckSession(driver, loginPage); loginAndCheckSession(driver, loginPage);