[java-oidc-common] branch main updated: Migrate another test.

Scott Cantor cantor.2 at osu.edu
Tue Dec 7 15:59:17 UTC 2021


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

scantor pushed a commit to branch main
in repository java-oidc-common.

View the commit online:
http://git.shibboleth.net/view/?p=java-oidc-common.git;a=commit;h=f7fdb1678edbaf1ed2c10af053053a150dc29e60

The following commit(s) were added to refs/heads/main by this push:
     new f7fdb16  Migrate another test.
f7fdb16 is described below

commit f7fdb1678edbaf1ed2c10af053053a150dc29e60
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Dec 7 10:59:14 2021 -0500

    Migrate another test.
---
 ...ticationContextClassReferencePrincipalTest.java | 52 ++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/oidc-common-profile-api/src/test/java/net/shibboleth/oidc/authn/principal/AuthenticationContextClassReferencePrincipalTest.java b/oidc-common-profile-api/src/test/java/net/shibboleth/oidc/authn/principal/AuthenticationContextClassReferencePrincipalTest.java
new file mode 100644
index 0000000..41a6965
--- /dev/null
+++ b/oidc-common-profile-api/src/test/java/net/shibboleth/oidc/authn/principal/AuthenticationContextClassReferencePrincipalTest.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the University Corporation for Advanced Internet Development,
+ * Inc. (UCAID) under one or more contributor license agreements.  See the
+ * NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The UCAID licenses this file to You under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file except in
+ * compliance with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.oidc.authn.principal;
+
+import org.testng.Assert;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class AuthenticationContextClassReferencePrincipalTest {
+
+    private AuthenticationContextClassReferencePrincipal principal;
+
+    @BeforeMethod
+    protected void setUp() throws Exception {
+        principal = new AuthenticationContextClassReferencePrincipal("testvalue");
+    }
+
+    @Test
+    public void testEquals() {
+        Assert.assertNotEquals(principal, null);
+        Assert.assertEquals(principal, principal);
+        Assert.assertEquals(principal, new AuthenticationContextClassReferencePrincipal("testvalue"));
+        Assert.assertNotEquals(principal, new AuthenticationContextClassReferencePrincipal("testvalue2"));
+    }
+
+    @Test
+    public void testClone() throws CloneNotSupportedException {
+        Assert.assertEquals(principal, principal.clone());
+    }
+
+    @Test
+    public void testToString() {
+        Assert.assertEquals(principal.toString(),
+                "AuthenticationContextClassReferencePrincipal{authnContextClassReference=" + principal.getName() + "}");
+    }
+
+}
\ No newline at end of file

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


More information about the commits mailing list