Renamed **/Test.java to **/Tests.java to better follow conventions

This commit is contained in:
Rob Winch 2011-12-28 17:05:46 -06:00
parent aabb16912f
commit 8ca2927761
7 changed files with 19 additions and 19 deletions

View File

@ -13,7 +13,7 @@ import java.util.*;
* @author Ruud Senden
*/
@SuppressWarnings("unchecked")
public class MapBasedAttributes2GrantedAuthoritiesMapperTest {
public class MapBasedAttributes2GrantedAuthoritiesMapperTests {
@Test(expected=IllegalArgumentException.class)
public void testAfterPropertiesSetNoMap() throws Exception {

View File

@ -34,7 +34,7 @@ import org.junit.Test;
* @author Mike Wiesner
* @since 3.0
*/
public class JndiDnsResolverTest {
public class JndiDnsResolverTests {
private JndiDnsResolver dnsResolver;
private InitialContextFactory contextFactory;

View File

@ -22,7 +22,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
import javax.servlet.jsp.JspException;
public class AuthzImplAttributeTest extends TestCase {
public class AuthzImplAttributeTests extends TestCase {
//~ Instance fields ================================================================================================
private final Authz authz = new AuthzImpl();

View File

@ -19,7 +19,7 @@ import junit.framework.TestCase;
import org.springframework.security.authentication.TestingAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
public class AuthzImplAuthorizeTagTest extends TestCase {
public class AuthzImplAuthorizeTagTests extends TestCase {
//~ Instance fields ================================================================================================
private Authz authz = new AuthzImpl();

View File

@ -18,7 +18,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:org/springframework/security/web/authentication/DelegatingAuthenticationEntryPointTest-context.xml")
public class DelegatingAuthenticationEntryPointContextTest {
public class DelegatingAuthenticationEntryPointContextTests {
@Autowired
private DelegatingAuthenticationEntryPoint daep;

View File

@ -29,18 +29,18 @@ import org.springframework.security.web.util.RequestMatcher;
/**
* Test class for {@link DelegatingAuthenticationEntryPoint}
*
*
* @author Mike Wiesner
* @since 3.0.2
* @version $Id:$
*/
public class DelegatingAuthenticationEntryPointTest {
public class DelegatingAuthenticationEntryPointTests {
private DelegatingAuthenticationEntryPoint daep;
private LinkedHashMap<RequestMatcher, AuthenticationEntryPoint> entryPoints;
private AuthenticationEntryPoint defaultEntryPoint;
private HttpServletRequest request = new MockHttpServletRequest();
@Before
public void before() {
defaultEntryPoint = mock(AuthenticationEntryPoint.class);
@ -48,20 +48,20 @@ public class DelegatingAuthenticationEntryPointTest {
daep = new DelegatingAuthenticationEntryPoint(entryPoints);
daep.setDefaultEntryPoint(defaultEntryPoint);
}
@Test
public void testDefaultEntryPoint() throws Exception {
AuthenticationEntryPoint firstAEP = mock(AuthenticationEntryPoint.class);
RequestMatcher firstRM = mock(RequestMatcher.class);
when(firstRM.matches(request)).thenReturn(false);
entryPoints.put(firstRM, firstAEP);
daep.commence(request, null, null);
verify(defaultEntryPoint).commence(request, null, null);
verify(firstAEP, never()).commence(request, null, null);
}
@Test
public void testFirstEntryPoint() throws Exception {
AuthenticationEntryPoint firstAEP = mock(AuthenticationEntryPoint.class);
@ -71,15 +71,15 @@ public class DelegatingAuthenticationEntryPointTest {
when(firstRM.matches(request)).thenReturn(true);
entryPoints.put(firstRM, firstAEP);
entryPoints.put(secondRM, secondAEP);
daep.commence(request, null, null);
verify(firstAEP).commence(request, null, null);
verify(secondAEP, never()).commence(request, null, null);
verify(defaultEntryPoint, never()).commence(request, null, null);
verify(secondRM, never()).matches(request);
}
@Test
public void testSecondEntryPoint() throws Exception {
AuthenticationEntryPoint firstAEP = mock(AuthenticationEntryPoint.class);
@ -90,9 +90,9 @@ public class DelegatingAuthenticationEntryPointTest {
when(secondRM.matches(request)).thenReturn(true);
entryPoints.put(firstRM, firstAEP);
entryPoints.put(secondRM, secondAEP);
daep.commence(request, null, null);
verify(secondAEP).commence(request, null, null);
verify(firstAEP, never()).commence(request, null, null);
verify(defaultEntryPoint, never()).commence(request, null, null);

View File

@ -57,7 +57,7 @@ import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter;
*
* @author Rob Winch
*/
public class JaasApiIntegrationFilterTest {
public class JaasApiIntegrationFilterTests {
//~ Instance fields ================================================================================================
private JaasApiIntegrationFilter filter;
private MockHttpServletRequest request;