[java-identity-provider COMMIT] in /trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl: FilterAttri...

noreply at shibboleth.net noreply at shibboleth.net
Mon Feb 3 21:36:15 EST 2014


Author: scantor
Date: Mon Feb  3 21:36:15 2014
New Revision: 5309

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

Modified:
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/FilterAttributesTest.java
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ResolveAttributesTest.java

Modified: trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/FilterAttributesTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/FilterAttributesTest.java?rev=5309&r1=5308&r2=5309&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/FilterAttributesTest.java (original)
+++ trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/FilterAttributesTest.java Mon Feb  3 21:36:15 2014
@@ -35,6 +35,7 @@
 import net.shibboleth.idp.attribute.filter.MockMatcher;
 import net.shibboleth.idp.attribute.filter.PolicyRequirementRule;
 import net.shibboleth.idp.attribute.filter.context.AttributeFilterContext;
+import net.shibboleth.idp.authn.context.SubjectContext;
 import net.shibboleth.idp.profile.IdPEventIds;
 import net.shibboleth.idp.profile.RequestContextBuilder;
 import net.shibboleth.idp.relyingparty.RelyingPartyContext;
@@ -69,6 +70,7 @@
     /** Test that the action errors out properly if there is no attribute context. */
     @Test public void testNoAttributeContext() throws Exception {
         final ProfileRequestContext profileCtx = new RequestContextBuilder().buildProfileRequestContext();
+        profileCtx.getSubcontext(SubjectContext.class, true);
 
         final AttributeFilterImpl engine = new AttributeFilterImpl("test", null);
         engine.initialize();
@@ -84,6 +86,7 @@
     /** Test that the action proceeds properly if there are no attributes to filter . */
     @Test public void testNoAttributes() throws Exception {
         final ProfileRequestContext profileCtx = new RequestContextBuilder().buildProfileRequestContext();
+        profileCtx.getSubcontext(SubjectContext.class, true);
 
         final AttributeContext attribCtx = new AttributeContext();
         profileCtx.getSubcontext(RelyingPartyContext.class).addSubcontext(attribCtx);
@@ -127,6 +130,7 @@
         engine.initialize();
 
         final ProfileRequestContext profileCtx = new RequestContextBuilder().buildProfileRequestContext();
+        profileCtx.getSubcontext(SubjectContext.class, true);
 
         final AttributeContext attributeCtx = new AttributeContext();
         attributeCtx.setIdPAttributes(attributes);
@@ -184,6 +188,7 @@
         engine.initialize();
 
         final ProfileRequestContext profileCtx = new RequestContextBuilder().buildProfileRequestContext();
+        profileCtx.getSubcontext(SubjectContext.class, true);
 
         final AttributeContext attributeCtx = new AttributeContext();
         attributeCtx.setIdPAttributes(attributes);
@@ -241,6 +246,7 @@
         engine.initialize();
 
         final ProfileRequestContext profileCtx = new RequestContextBuilder().buildProfileRequestContext();
+        profileCtx.getSubcontext(SubjectContext.class, true);
 
         final AttributeContext attributeCtx = new AttributeContext();
         attributeCtx.setIdPAttributes(attributes);
@@ -260,6 +266,7 @@
     /** Test that action returns the proper event if the attribute configuration is broken */
     @Test public void testUnableToFindFilter() throws Exception {
         final ProfileRequestContext profileCtx = new RequestContextBuilder().buildProfileRequestContext();
+        profileCtx.getSubcontext(SubjectContext.class, true);
 
         final IdPAttribute attribute1 = new MockUncloneableAttribute("attribute1");
         attribute1.setValues(Lists.newArrayList(new StringAttributeValue("one"), new StringAttributeValue("two")));

Modified: trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ResolveAttributesTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ResolveAttributesTest.java?rev=5309&r1=5308&r2=5309&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ResolveAttributesTest.java (original)
+++ trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ResolveAttributesTest.java Mon Feb  3 21:36:15 2014
@@ -31,6 +31,7 @@
 import net.shibboleth.idp.attribute.resolver.ResolutionException;
 import net.shibboleth.idp.attribute.resolver.context.AttributeResolutionContext;
 import net.shibboleth.idp.attribute.resolver.impl.AttributeResolverImpl;
+import net.shibboleth.idp.authn.context.SubjectContext;
 import net.shibboleth.idp.profile.IdPEventIds;
 import net.shibboleth.idp.profile.RequestContextBuilder;
 import net.shibboleth.idp.relyingparty.RelyingPartyContext;
@@ -70,6 +71,7 @@

[... 40 lines stripped ...]


More information about the commits mailing list