[java-identity-provider COMMIT] /trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/SAMLEnco...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Nov 14 14:52:50 EST 2014
Author: scantor
Date: Fri Nov 14 14:52:50 2014
New Revision: 6898
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6898&view=rev
Log:
IDP-513 - Missed a check-in.
Modified:
trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/SAMLEncoderSupportTest.java
Modified: trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/SAMLEncoderSupportTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/SAMLEncoderSupportTest.java?rev=6898&r1=6897&r2=6898&view=diff
==============================================================================
--- trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/SAMLEncoderSupportTest.java (original)
+++ trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/SAMLEncoderSupportTest.java Fri Nov 14 14:52:50 2014
@@ -67,23 +67,23 @@
@Test public void encodeStringValue() {
try {
- SAMLEncoderSupport.encodeStringValue(null, QNAME, STRING_VALUE );
- Assert.fail("Missed contraint");
- } catch (ConstraintViolationException ex) {
- //OK
- }
-
- try {
- SAMLEncoderSupport.encodeStringValue(ATTR, null, STRING_VALUE );
- Assert.fail("Missed contraint");
- } catch (ConstraintViolationException ex) {
- //OK
- }
-
- Assert.assertNull(SAMLEncoderSupport.encodeStringValue(ATTR, QNAME, ""));
- Assert.assertNull(SAMLEncoderSupport.encodeStringValue(ATTR, QNAME, null));
-
- XMLObject obj = SAMLEncoderSupport.encodeStringValue(ATTR, QNAME, STRING_VALUE);
+ SAMLEncoderSupport.encodeStringValue(null, QNAME, STRING_VALUE, true);
+ Assert.fail("Missed contraint");
+ } catch (ConstraintViolationException ex) {
+ //OK
+ }
+
+ try {
+ SAMLEncoderSupport.encodeStringValue(ATTR, null, STRING_VALUE, true);
+ Assert.fail("Missed contraint");
+ } catch (ConstraintViolationException ex) {
+ //OK
+ }
+
+ Assert.assertNull(SAMLEncoderSupport.encodeStringValue(ATTR, QNAME, "", true));
+ Assert.assertNull(SAMLEncoderSupport.encodeStringValue(ATTR, QNAME, null, true));
+
+ XMLObject obj = SAMLEncoderSupport.encodeStringValue(ATTR, QNAME, STRING_VALUE, true);
Assert.assertEquals(obj.getElementQName().getLocalPart(), QNAME_LOCALPART);
Assert.assertTrue(obj instanceof XSString);
XSString str = (XSString) obj;
@@ -94,23 +94,23 @@
@Test public void encodeByteArrayValue() {
try {
- SAMLEncoderSupport.encodeByteArrayValue(null, QNAME, BYTE_ARRAY_VALUE);
- Assert.fail("Missed contraint");
- } catch (ConstraintViolationException ex) {
- //OK
- }
-
- try {
- SAMLEncoderSupport.encodeByteArrayValue(ATTR, null, BYTE_ARRAY_VALUE);
- Assert.fail("Missed contraint");
- } catch (ConstraintViolationException ex) {
- //OK
- }
-
- Assert.assertNull(SAMLEncoderSupport.encodeByteArrayValue(ATTR, QNAME, null));
- Assert.assertNull(SAMLEncoderSupport.encodeByteArrayValue(ATTR, QNAME, new byte[] {}));
-
- XMLObject obj = SAMLEncoderSupport.encodeByteArrayValue(ATTR, QNAME, BYTE_ARRAY_VALUE);
+ SAMLEncoderSupport.encodeByteArrayValue(null, QNAME, BYTE_ARRAY_VALUE, true);
+ Assert.fail("Missed contraint");
+ } catch (ConstraintViolationException ex) {
+ //OK
+ }
+
+ try {
+ SAMLEncoderSupport.encodeByteArrayValue(ATTR, null, BYTE_ARRAY_VALUE, true);
+ Assert.fail("Missed contraint");
+ } catch (ConstraintViolationException ex) {
+ //OK
+ }
+
+ Assert.assertNull(SAMLEncoderSupport.encodeByteArrayValue(ATTR, QNAME, null, true));
+ Assert.assertNull(SAMLEncoderSupport.encodeByteArrayValue(ATTR, QNAME, new byte[] {}, true));
+
+ XMLObject obj = SAMLEncoderSupport.encodeByteArrayValue(ATTR, QNAME, BYTE_ARRAY_VALUE, true);
Assert.assertEquals(obj.getElementQName().getLocalPart(), QNAME_LOCALPART);
Assert.assertTrue(obj instanceof XSString);
XSString str = (XSString) obj;
@@ -157,29 +157,29 @@
XMLObjectProviderRegistrySupport.registerObjectProvider(ScopedValue.TYPE_NAME, new ScopedValueBuilder(), new ScopedValueMarshaller(), new ScopedValueUnmarshaller());
try {
- SAMLEncoderSupport.encodeScopedStringValueAttribute(null, QNAME, SCOPEDVAL, SCOPE_ATTRIBUTE_NAME);
- Assert.fail("Missed contraint");
- } catch (ConstraintViolationException ex) {
- //OK
- }
-
- try {
- SAMLEncoderSupport.encodeScopedStringValueAttribute(ATTR, null, SCOPEDVAL, SCOPE_ATTRIBUTE_NAME);
- Assert.fail("Missed contraint");
[... 94 lines stripped ...]
More information about the commits
mailing list