Skip to content

Commit

Permalink
test: added getUserInfo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rglauco committed Oct 26, 2023
1 parent 3dc796f commit b8a700e
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import java.lang.reflect.Method;

import it.spid.cie.oidc.exception.OIDCException;
import org.json.JSONObject;
import org.junit.Test;

Expand Down Expand Up @@ -148,6 +149,17 @@ public void test_getUserInfo() {
MemoryStorage storage = null;

boolean catched = false;
try {
options = RPTestUtils.getOptions();
storage = new MemoryStorage();
handler = new RelyingPartyHandler(options, storage);
handler.getUserInfo("test","test");
} catch (OIDCException e) {
catched = true;
} catch (Exception e) {
catched = true;
}
assertTrue(catched);

try {
options = RPTestUtils.getOptions();
Expand All @@ -159,7 +171,7 @@ public void test_getUserInfo() {
catched = true;
}

assertFalse(catched);
assertTrue(catched);

// Case

Expand Down

0 comments on commit b8a700e

Please sign in to comment.