-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update per review - Generate tests in admin-client-tests from admin-c…
…lient-jee-tests Signed-off-by: mposolda <[email protected]>
- Loading branch information
Showing
9 changed files
with
86 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
.../admin-client-jee-tests/src/test/java/org/keycloak/client/testsuite/ClasspathJEETest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.keycloak.client.testsuite; | ||
|
||
import java.lang.reflect.Field; | ||
|
||
import org.jboss.resteasy.client.jaxrs.ResteasyClient; | ||
import org.junit.jupiter.api.Test; | ||
import org.keycloak.admin.client.Keycloak; | ||
import org.testcontainers.shaded.org.hamcrest.MatcherAssert; | ||
|
||
import static org.testcontainers.shaded.org.hamcrest.Matchers.equalTo; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Marek Posolda</a> | ||
*/ | ||
public class ClasspathJEETest { | ||
|
||
@Test | ||
public void testCorrectResteasyClient() throws Exception { | ||
Field clientField = Keycloak.class.getDeclaredField("client"); | ||
Class clientFieldClass = clientField.getType(); | ||
MatcherAssert.assertThat(getExpectedClientFieldClass(), equalTo(clientFieldClass.getName())); | ||
} | ||
|
||
@Test | ||
public void testResteasyVersion() throws Exception { | ||
Class resteasyClientSuperclass = ResteasyClient.class.getInterfaces()[0]; | ||
MatcherAssert.assertThat(getExpectedClientFieldClass(), equalTo(resteasyClientSuperclass.getName())); | ||
} | ||
|
||
protected String getExpectedClientFieldClass() { | ||
return "javax.ws.rs.client.Client"; | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
12 changes: 0 additions & 12 deletions
12
...ee-tests/src/test/java/org/keycloak/client/testsuite/adminclientjee/ClasspathJEETest.java
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...t-jee-tests/src/test/java/org/keycloak/client/testsuite/adminclientjee/RealmsJEETest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.keycloak.client.testsuite.adminclient; | ||
package org.keycloak.client.testsuite; | ||
|
||
import java.lang.reflect.Field; | ||
|
||
|
@@ -14,7 +14,7 @@ | |
* | ||
* @author <a href="mailto:[email protected]">Marek Posolda</a> | ||
*/ | ||
public class ClasspathTest { | ||
public class ClasspathJakartaTest { | ||
|
||
@Test | ||
public void testCorrectResteasyClient() throws Exception { | ||
|