[java-idp-plugin-duo] 08/15: Save the original registry test

Phil Smart philip.smart at jisc.ac.uk
Tue Jul 14 14:29:04 UTC 2020


This is an automated email from the git hooks/post-receive script.

philsmart pushed a commit to branch master
in repository java-idp-plugin-duo.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-duo.git;a=commit;h=267a3456cf5b636f634897ed36281e2ff2d679de

commit 267a3456cf5b636f634897ed36281e2ff2d679de
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Mon Jun 29 11:56:36 2020 +0100

    Save the original registry test
---
 .../duo/impl/DefaultDuoOIDCClientRegistryTest.java   | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistryTest.java b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistryTest.java
index f467de6..8935005 100644
--- a/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistryTest.java
+++ b/idp-duo-impl/src/test/java/net/shibboleth/idp/plugin/authn/duo/impl/DefaultDuoOIDCClientRegistryTest.java
@@ -15,24 +15,23 @@ class DefaultDuoOIDCClientRegistryTest {
 
     @Test
     void test() throws DuoRegistryException {
-        DefaultDuoOIDCClientRegistry factory = new DefaultDuoOIDCClientRegistry();
+        final DefaultDuoOIDCClientRegistry factory = new DefaultDuoOIDCClientRegistry();
         factory.setClientType(MockDuoOIDCClient_OK.class.getName());
-        DefaultDuoOIDCIntegration integ = new DefaultDuoOIDCIntegration();
+        final DefaultDuoOIDCIntegration integ = new DefaultDuoOIDCIntegration();
         integ.setAPIHost("host.com");
-        integ.setApplicationKey("SDFGHJKLPOIUYTREWQZXCVBNMLKJHGFAQWERTYU");
-        integ.setIntegrationKey("DIU6GEFWG5LIUBVV2M3P");
+        integ.setClientId("DIU6GEFWG5LIUBVV2M3P");
         integ.setRedirectURI("http://localhost/");
         integ.setSecretKey("rFvDfPul27v3Wew2zb6xRPzAJewJ34MP2w8UitPh");
 
-        DuoOIDCClient client = factory.getIntegrationClientOrCreate(integ);
-        DuoOIDCClient clientTwo = factory.getIntegrationClientOrCreate(integ);
+        final DuoOIDCClient client = factory.getIntegrationClientOrCreate(integ);
+        final DuoOIDCClient clientTwo = factory.getIntegrationClientOrCreate(integ);
         
         Assertions.assertEquals(client, clientTwo);
         
         //set to a different value
-        integ.setIntegrationKey("DIU6GEFWG5LIUBVV2M3B");
+        integ.setClientId("DIU6GEFWG5LIUBVV2M3B");
         //should get a new client.
-        DuoOIDCClient clientThree = factory.getIntegrationClientOrCreate(integ);
+        final DuoOIDCClient clientThree = factory.getIntegrationClientOrCreate(integ);
         
         System.out.println("Client: "+client+" Client2: "+clientTwo+" Client3: "+clientThree);
         Assertions.assertNotSame(client, clientThree);
@@ -40,8 +39,9 @@ class DefaultDuoOIDCClientRegistryTest {
     }
     
     @Test public void testUknownClientType() {
-        DefaultDuoOIDCClientRegistry factory = new DefaultDuoOIDCClientRegistry();
-        Assertions.assertThrows(ConstraintViolationException.class,() -> factory.setClientType("no.such.client.DuoClient"));
+        final DefaultDuoOIDCClientRegistry factory = new DefaultDuoOIDCClientRegistry();
+        Assertions.assertThrows(ConstraintViolationException.class,() -> 
+            factory.setClientType("no.such.client.DuoClient"));
     }
     
     

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list