mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-28 14:52:24 +00:00
Corrected spelling of class name.
This commit is contained in:
parent
83ecb3e9e0
commit
0005da3b63
@ -0,0 +1,42 @@
|
|||||||
|
package org.springframework.security.ui.preauth;
|
||||||
|
|
||||||
|
import org.springframework.security.AuthenticationCredentialsNotFoundException;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
|
import org.springframework.mock.web.MockHttpServletRequest;
|
||||||
|
import org.springframework.mock.web.MockHttpServletResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TSARDD
|
||||||
|
* @since 18-okt-2007
|
||||||
|
*/
|
||||||
|
public class PreAuthenticatedProcessingFilterEntryPointTests extends TestCase {
|
||||||
|
|
||||||
|
public void testGetSetOrder() {
|
||||||
|
PreAuthenticatedProcessingFilterEntryPoint fep = new PreAuthenticatedProcessingFilterEntryPoint();
|
||||||
|
fep.setOrder(333);
|
||||||
|
assertEquals(fep.getOrder(), 333);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testCommence() {
|
||||||
|
MockHttpServletRequest req = new MockHttpServletRequest();
|
||||||
|
MockHttpServletResponse resp = new MockHttpServletResponse();
|
||||||
|
PreAuthenticatedProcessingFilterEntryPoint fep = new PreAuthenticatedProcessingFilterEntryPoint();
|
||||||
|
try {
|
||||||
|
fep.commence(req,resp,new AuthenticationCredentialsNotFoundException("test"));
|
||||||
|
assertEquals("Incorrect status",resp.getStatus(),HttpServletResponse.SC_FORBIDDEN);
|
||||||
|
} catch (IOException e) {
|
||||||
|
fail("Unexpected exception thrown: "+e);
|
||||||
|
} catch (ServletException e) {
|
||||||
|
fail("Unexpected exception thrown: "+e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user