[java-identity-provider COMMIT] /trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/im...
noreply at shibboleth.net
noreply at shibboleth.net
Sat Jul 13 05:00:28 EDT 2013
Author: rdw
Date: Sat Jul 13 05:00:28 2013
New Revision: 4566
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4566&view=rev
Log:
IDP-287 Change local variable from "matcher" to policy rule. Got missed when I cloned the test from the scripted matcher test,
Modified:
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/policyrule/ScriptedPolicyRuleTest.java
Modified: trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/policyrule/ScriptedPolicyRuleTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/policyrule/ScriptedPolicyRuleTest.java?rev=4566&r1=4565&r2=4566&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/policyrule/ScriptedPolicyRuleTest.java (original)
+++ trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/policyrule/ScriptedPolicyRuleTest.java Sat Jul 13 05:00:28 2013
@@ -20,7 +20,6 @@
import javax.annotation.concurrent.ThreadSafe;
import net.shibboleth.idp.attribute.filter.AttributeFilterContext;
-import net.shibboleth.idp.attribute.filter.AttributeFilterException;
import net.shibboleth.idp.attribute.filter.PolicyRequirementRule.Tristate;
import net.shibboleth.idp.attribute.filter.impl.matcher.AbstractMatcherPolicyRuleTest;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
@@ -65,12 +64,12 @@
}
@Test public void testNullArguments() throws Exception {
- ScriptedPolicyRule matcher = new ScriptedPolicyRule(trueReturnScript);
- matcher.setId("Test");
- matcher.initialize();
+ ScriptedPolicyRule rule = new ScriptedPolicyRule(trueReturnScript);
+ rule.setId("Test");
+ rule.initialize();
try {
- matcher.matches(null);
+ rule.matches(null);
Assert.fail();
} catch (ConstraintViolationException e) {
// expected this
@@ -85,48 +84,48 @@
}
@Test public void testNullReturnScript() throws Exception {
- ScriptedPolicyRule matcher = new ScriptedPolicyRule(nullReturnScript);
- matcher.setId("Test");
- matcher.initialize();
+ ScriptedPolicyRule rule = new ScriptedPolicyRule(nullReturnScript);
+ rule.setId("Test");
+ rule.initialize();
- Assert.assertEquals(matcher.matches(filterContext), Tristate.FAIL);
+ Assert.assertEquals(rule.matches(filterContext), Tristate.FAIL);
}
@Test public void testInvalidReturnObjectValue() throws Exception {
- ScriptedPolicyRule matcher = new ScriptedPolicyRule(invalidReturnObjectScript);
- matcher.setId("Test");
- matcher.initialize();
+ ScriptedPolicyRule rule = new ScriptedPolicyRule(invalidReturnObjectScript);
+ rule.setId("Test");
+ rule.initialize();
- Assert.assertEquals(matcher.matches(filterContext), Tristate.FAIL);
+ Assert.assertEquals(rule.matches(filterContext), Tristate.FAIL);
}
- @Test public void testInitTeardown() throws AttributeFilterException, ComponentInitializationException {
- ScriptedPolicyRule matcher = new ScriptedPolicyRule(trueReturnScript);
+ @Test public void testInitTeardown() throws ComponentInitializationException {
+ ScriptedPolicyRule rule = new ScriptedPolicyRule(trueReturnScript);
boolean thrown = false;
try {
- matcher.matches(filterContext);
+ rule.matches(filterContext);
} catch (UninitializedComponentException e) {
thrown = true;
}
Assert.assertTrue(thrown, "matches before init");
- matcher.setId("Test");
- matcher.initialize();
- matcher.matches(filterContext);
+ rule.setId("Test");
+ rule.initialize();
+ rule.matches(filterContext);
thrown = false;
try {
- matcher.setScript(trueReturnScript);
+ rule.setScript(trueReturnScript);
} catch (UnmodifiableComponentException e) {
thrown = true;
}
- matcher.destroy();
+ rule.destroy();
thrown = false;
try {
- matcher.initialize();
+ rule.initialize();
} catch (DestroyedComponentException e) {
thrown = true;
}
@@ -134,7 +133,7 @@
thrown = false;
try {
- matcher.matches(filterContext);
+ rule.matches(filterContext);
} catch (DestroyedComponentException e) {
thrown = true;
}
@@ -143,40 +142,40 @@
}
@Test public void testEqualsHashToString() {
- ScriptedPolicyRule matcher = new ScriptedPolicyRule(trueReturnScript);
[... 58 lines stripped ...]
More information about the commits
mailing list