コード例 #1
0
ファイル: BaseOAuth20ClientIT.java プロジェクト: kouao/pac4j
 public void testNoCode() throws RequiresHttpAction {
   try {
     getClient().getCredentials(MockWebContext.create());
     fail("should not get credentials");
   } catch (final TechnicalException e) {
     assertEquals("No credential found", e.getMessage());
   }
 }
コード例 #2
0
 public void testMissingUser() throws RequiresHttpAction {
   final MyOpenIdClient client = (MyOpenIdClient) getClient();
   try {
     client.getRedirectionUrl(MockWebContext.create(), true, false);
     fail("should fail because of missing OpenID user");
   } catch (final TechnicalException e) {
     assertEquals("openIdUser cannot be blank", e.getMessage());
   }
 }