SEC-2781: Remove deprecations

This commit is contained in:
Rob Winch
2014-12-03 13:34:15 -06:00
parent 5bb0ce9a8f
commit 6e204fff72
177 changed files with 536 additions and 5022 deletions

View File

@@ -39,7 +39,7 @@ public class OpenID4JavaConsumerTests {
when(mgr.authenticate(any(DiscoveryInformation.class), anyString(), anyString())).thenReturn(authReq);
when(mgr.associate(anyList())).thenReturn(di);
OpenID4JavaConsumer consumer = new OpenID4JavaConsumer(mgr, attributes);
OpenID4JavaConsumer consumer = new OpenID4JavaConsumer(mgr, new MockAttributesFactory());
MockHttpServletRequest request = new MockHttpServletRequest();
consumer.beginConsumption(request, "", "", "");
@@ -195,11 +195,16 @@ public class OpenID4JavaConsumerTests {
consumer.endConsumption(new MockHttpServletRequest());
}
@SuppressWarnings("deprecation")
@Test
public void additionalConstructorsWork() throws Exception {
new OpenID4JavaConsumer();
new OpenID4JavaConsumer(attributes);
new OpenID4JavaConsumer(new MockAttributesFactory());
}
private class MockAttributesFactory implements AxFetchListFactory {
public List<OpenIDAttribute> createAttributeList(String identifier) {
return attributes;
}
}
}

View File

@@ -45,7 +45,9 @@ public class OpenIDAuthenticationFilterTests {
@Test
public void testFilterOperation() throws Exception {
MockHttpServletRequest req = new MockHttpServletRequest("GET", REQUEST_PATH);
MockHttpServletRequest req = new MockHttpServletRequest();
req.setServletPath(REQUEST_PATH);
req.setRequestURI(REQUEST_PATH);
req.setServerPort(8080);
MockHttpServletResponse response = new MockHttpServletResponse();