[java-identity-provider COMMIT] in /trunk: idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/Abst...

noreply at shibboleth.net noreply at shibboleth.net
Wed Aug 6 09:26:16 EDT 2014


Author: rdw
Date: Wed Aug  6 09:26:16 2014
New Revision: 6402

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6402&view=rev
Log:
IDP-461 Fix tests

Modified:
    trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/AbstractSAMLAttributeEncoderTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1StringNameIdentifierEncoderTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2StringNameIDEncoderTest.java

Modified: trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/AbstractSAMLAttributeEncoderTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/AbstractSAMLAttributeEncoderTest.java?rev=6402&r1=6401&r2=6402&view=diff
==============================================================================
--- trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/AbstractSAMLAttributeEncoderTest.java (original)
+++ trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/AbstractSAMLAttributeEncoderTest.java Wed Aug  6 09:26:16 2014
@@ -26,10 +26,10 @@
 import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.idp.attribute.AttributeEncodingException;
+import net.shibboleth.idp.attribute.ByteAttributeValue;
 import net.shibboleth.idp.attribute.IdPAttribute;
-import net.shibboleth.idp.attribute.AttributeEncodingException;
 import net.shibboleth.idp.attribute.IdPAttributeValue;
-import net.shibboleth.idp.attribute.ByteAttributeValue;
 import net.shibboleth.idp.attribute.StringAttributeValue;
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 import net.shibboleth.utilities.java.support.component.UninitializedComponentException;
@@ -68,7 +68,7 @@
         AbstractSAML1AttributeEncoder encoder = new mockEncoder(theBuilder, theQName);
         
         Assert.assertNull(encoder.getName());
-        Assert.assertNull(encoder.getNamespace());
+        Assert.assertEquals(encoder.getNamespace(), "urn:mace:shibboleth:1.0:attributeNamespace:uri");
         
         try {
             encoder.setName("");
@@ -131,6 +131,7 @@
                 Lists.newArrayList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
                         null,
                         new IdPAttributeValue<Object>() {
+                            @Override
                             public Object getValue() {
                                 return intArray;
                             }

Modified: trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java?rev=6402&r1=6401&r2=6402&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java (original)
+++ trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java Wed Aug  6 09:26:16 2014
@@ -21,9 +21,9 @@
 import java.util.List;
 
 import net.shibboleth.idp.attribute.AttributeEncodingException;
-import net.shibboleth.idp.attribute.IdPAttributeValue;
 import net.shibboleth.idp.attribute.ByteAttributeValue;
 import net.shibboleth.idp.attribute.IdPAttribute;
+import net.shibboleth.idp.attribute.IdPAttributeValue;
 import net.shibboleth.idp.attribute.ScopedStringAttributeValue;
 import net.shibboleth.idp.attribute.StringAttributeValue;
 import net.shibboleth.idp.saml.xmlobject.ScopedValue;
@@ -95,6 +95,7 @@
         final Collection<IdPAttributeValue<?>> values =
                 Lists.newArrayList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue("dd"),
                         new IdPAttributeValue<Object>() {
+                            @Override
                             public Object getValue() {
                                 return intArray;
                             }
@@ -212,12 +213,6 @@
         }
 
         encoder.setScopeType("inline");
-        try {
-            encoder.initialize();
-            Assert.fail("Missing sep should throw");
-        } catch (ComponentInitializationException e) {
-            // OK
-        }
         encoder.setScopeDelimiter(DELIMITER);
         encoder.initialize();
 

Modified: trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1StringNameIdentifierEncoderTest.java

[... 100 lines stripped ...]


More information about the commits mailing list