Renamed SecurityTestUtil to SecurityTestUtils.

This commit is contained in:
Mark Fisher
2008-09-29 02:23:00 +00:00
parent 121c7a65b1
commit f55336ba55
3 changed files with 6 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ import org.springframework.security.providers.UsernamePasswordAuthenticationToke
/**
* @author Jonas Partner
*/
public class SecurityTestUtil {
public class SecurityTestUtils {
public static SecurityContext createContext(String username, String password, String... roles) {
SecurityContextImpl ctxImpl = new SecurityContextImpl();

View File

@@ -25,7 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.integration.channel.MessageChannel;
import org.springframework.integration.message.StringMessage;
import org.springframework.integration.security.SecurityTestUtil;
import org.springframework.integration.security.SecurityTestUtils;
import org.springframework.security.AccessDeniedException;
import org.springframework.security.AuthenticationException;
import org.springframework.security.context.SecurityContext;
@@ -104,7 +104,7 @@ public class ChannelAdapterSecurityIntegrationTests extends AbstractJUnit4Spring
private void login(String username, String password, String... roles) {
SecurityContext context = SecurityTestUtil.createContext(username, password, roles);
SecurityContext context = SecurityTestUtils.createContext(username, password, roles);
SecurityContextHolder.setContext(context);
}

View File

@@ -26,7 +26,7 @@ import org.springframework.aop.framework.ProxyFactory;
import org.springframework.integration.channel.MessageChannel;
import org.springframework.integration.channel.QueueChannel;
import org.springframework.integration.message.StringMessage;
import org.springframework.integration.security.SecurityTestUtil;
import org.springframework.integration.security.SecurityTestUtils;
import org.springframework.security.AccessDeniedException;
import org.springframework.security.AuthenticationException;
import org.springframework.security.MockAuthenticationManager;
@@ -54,7 +54,7 @@ public class ChannelSecurityInterceptorTests {
@Test(expected = AccessDeniedException.class)
public void securedSendWithoutRole() throws Exception {
MessageChannel channel = getSecuredChannel("ROLE_ADMIN");
SecurityContext context = SecurityTestUtil.createContext("test", "pwd", "ROLE_USER");
SecurityContext context = SecurityTestUtils.createContext("test", "pwd", "ROLE_USER");
SecurityContextHolder.setContext(context);
channel.send(new StringMessage("test"));
}
@@ -62,7 +62,7 @@ public class ChannelSecurityInterceptorTests {
@Test
public void securedSendWithRole() throws Exception {
MessageChannel channel = getSecuredChannel("ROLE_ADMIN");
SecurityContext context = SecurityTestUtil.createContext("test", "pwd", "ROLE_ADMIN");
SecurityContext context = SecurityTestUtils.createContext("test", "pwd", "ROLE_ADMIN");
SecurityContextHolder.setContext(context);
channel.send(new StringMessage("test"));
}