[java-identity-provider COMMIT] in /trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config: Abstract...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Oct 23 17:20:41 EDT 2012
Author: tzeller
Date: Tue Oct 23 17:20:40 2012
New Revision: 4228
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4228&view=rev
Log:
Tests should catch ConstraintViolationException rather than IllegalArgumentException.
Modified:
trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/AbstractSamlProfileConfigurationTest.java
trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/saml2/AbstractSAML2ProfileConfigurationTest.java
Modified: trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/AbstractSamlProfileConfigurationTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/AbstractSamlProfileConfigurationTest.java?rev=4228&r1=4227&r2=4228&view=diff
==============================================================================
--- trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/AbstractSamlProfileConfigurationTest.java (original)
+++ trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/AbstractSamlProfileConfigurationTest.java Tue Oct 23 17:20:40 2012
@@ -21,6 +21,7 @@
import java.util.Set;
import net.shibboleth.idp.profile.ProfileRequestContext;
+import net.shibboleth.utilities.java.support.logic.ConstraintViolationException;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -41,7 +42,7 @@
try {
config.setSignAssertionsCriteria(null);
Assert.fail();
- } catch (IllegalArgumentException e) {
+ } catch (ConstraintViolationException e) {
// excepted this
}
}
@@ -56,7 +57,7 @@
try {
config.setSignResponsesCriteria(null);
Assert.fail();
- } catch (IllegalArgumentException e) {
+ } catch (ConstraintViolationException e) {
// excepted this
}
}
@@ -71,7 +72,7 @@
try {
config.setSignedRequestsCriteria(null);
Assert.fail();
- } catch (IllegalArgumentException e) {
+ } catch (ConstraintViolationException e) {
// excepted this
}
}
@@ -86,14 +87,14 @@
try {
config.setAssertionLifetime(0);
Assert.fail();
- } catch (IllegalArgumentException e) {
+ } catch (ConstraintViolationException e) {
// expected this
}
try {
config.setAssertionLifetime(-100);
Assert.fail();
- } catch (IllegalArgumentException e) {
+ } catch (ConstraintViolationException e) {
// expected this
}
}
Modified: trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/saml2/AbstractSAML2ProfileConfigurationTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/saml2/AbstractSAML2ProfileConfigurationTest.java?rev=4228&r1=4227&r2=4228&view=diff
==============================================================================
--- trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/saml2/AbstractSAML2ProfileConfigurationTest.java (original)
+++ trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/config/saml2/AbstractSAML2ProfileConfigurationTest.java Tue Oct 23 17:20:40 2012
@@ -20,6 +20,7 @@
import java.util.ArrayList;
import net.shibboleth.idp.profile.ProfileRequestContext;
+import net.shibboleth.utilities.java.support.logic.ConstraintViolationException;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -39,7 +40,7 @@
try {
config.setEncryptNameIDsCriteria(null);
Assert.fail();
- } catch (IllegalArgumentException e) {
+ } catch (ConstraintViolationException e) {
// excepted this
}
}
@@ -54,7 +55,7 @@
try {
config.setEncryptAssertionsCriteria(null);
Assert.fail();
- } catch (IllegalArgumentException e) {
+ } catch (ConstraintViolationException e) {
// excepted this
}
}
More information about the commits
mailing list