[java-identity-provider COMMIT] /trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingpart...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Aug 22 15:02:47 EDT 2016
Author: scantor
Date: Mon Aug 22 15:02:47 2016
New Revision: 8344
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=8344&view=rev
Log:
Really fix test due to parameter name change.
Modified:
trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ReloadMetadataTest.java
Modified: trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ReloadMetadataTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ReloadMetadataTest.java?rev=8344&r1=8343&r2=8344&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ReloadMetadataTest.java (original)
+++ trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ReloadMetadataTest.java Mon Aug 22 15:02:47 2016
@@ -30,7 +30,6 @@
import org.opensaml.profile.action.EventIds;
import org.opensaml.saml.metadata.resolver.MetadataResolver;
-import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.webflow.execution.Event;
import org.springframework.webflow.execution.RequestContext;
@@ -68,12 +67,10 @@
}
@Test public void serviceNotSpecified() throws ComponentInitializationException {
- final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final ReloadMetadata action = new ReloadMetadata();
action.setMetadataResolver(service);
- action.setHttpServletRequest(request);
action.setHttpServletResponse(response);
action.initialize();
@@ -83,29 +80,25 @@
}
@Test public void serviceNotFound() throws ComponentInitializationException {
- final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
final ReloadMetadata action = new ReloadMetadata();
action.setMetadataResolver(service);
- action.setHttpServletRequest(request);
action.setHttpServletResponse(response);
action.initialize();
- request.setParameter("id", "foo");
+ src.getFlowScope().put(ReloadMetadata.RESOLVER_ID, "foo");
final Event event = action.execute(src);
ActionTestingSupport.assertProceedEvent(event);
Assert.assertEquals(response.getStatus(), HttpServletResponse.SC_NOT_FOUND);
}
@Test public void serviceAction() throws ComponentInitializationException {
- final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
- request.setParameter("id", "fileEntity");
+ src.getFlowScope().put(ReloadMetadata.RESOLVER_ID, "fileEntity");
final ReloadMetadata action = new ReloadMetadata();
- action.setHttpServletRequest(request);
action.setHttpServletResponse(response);
action.setMetadataResolver(service);
action.initialize();
@@ -117,13 +110,11 @@
}
@Test public void chainingAction() throws ComponentInitializationException {
- final MockHttpServletRequest request = new MockHttpServletRequest();
final MockHttpServletResponse response = new MockHttpServletResponse();
- request.setParameter("id", "fileEntity2");
+ src.getFlowScope().put(ReloadMetadata.RESOLVER_ID, "fileEntity2");
final ReloadMetadata action = new ReloadMetadata();
- action.setHttpServletRequest(request);
action.setHttpServletResponse(response);
action.setMetadataResolver(chainingservice);
action.initialize();
More information about the commits
mailing list