Jalopy styling.
This commit is contained in:
parent
e1c7a6bc86
commit
494e35f009
|
@ -12,7 +12,6 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.sf.acegisecurity.context;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
@ -22,9 +21,6 @@ import net.sf.acegisecurity.GrantedAuthority;
|
|||
import net.sf.acegisecurity.GrantedAuthorityImpl;
|
||||
import net.sf.acegisecurity.MockFilterConfig;
|
||||
import net.sf.acegisecurity.adapters.PrincipalAcegiUserToken;
|
||||
import net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter;
|
||||
import net.sf.acegisecurity.context.SecurityContext;
|
||||
import net.sf.acegisecurity.context.SecurityContextImpl;
|
||||
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
|
@ -46,8 +42,6 @@ import javax.servlet.ServletResponse;
|
|||
* @version $Id$
|
||||
*/
|
||||
public class HttpSessionContextIntegrationFilterTests extends TestCase {
|
||||
//~ Constructors ===========================================================
|
||||
|
||||
public HttpSessionContextIntegrationFilterTests() {
|
||||
super();
|
||||
}
|
||||
|
@ -56,8 +50,6 @@ public class HttpSessionContextIntegrationFilterTests extends TestCase {
|
|||
super(arg0);
|
||||
}
|
||||
|
||||
//~ Methods ================================================================
|
||||
|
||||
public static void main(String[] args) {
|
||||
junit.textui.TestRunner.run(HttpSessionContextIntegrationFilterTests.class);
|
||||
}
|
||||
|
@ -88,7 +80,7 @@ public class HttpSessionContextIntegrationFilterTests extends TestCase {
|
|||
// Build an Authentication object we simulate came from HttpSession
|
||||
PrincipalAcegiUserToken sessionPrincipal = new PrincipalAcegiUserToken("key",
|
||||
"someone", "password",
|
||||
new GrantedAuthority[] {new GrantedAuthorityImpl("SOME_ROLE")});
|
||||
new GrantedAuthority[] { new GrantedAuthorityImpl("SOME_ROLE") });
|
||||
|
||||
// Build a Context to store in HttpSession (simulating prior request)
|
||||
SecurityContext sc = new SecurityContextImpl();
|
||||
|
@ -128,12 +120,14 @@ public class HttpSessionContextIntegrationFilterTests extends TestCase {
|
|||
// Build an Authentication object we simulate came from HttpSession
|
||||
PrincipalAcegiUserToken sessionPrincipal = new PrincipalAcegiUserToken("key",
|
||||
"someone", "password",
|
||||
new GrantedAuthority[] {new GrantedAuthorityImpl("SOME_ROLE")});
|
||||
new GrantedAuthority[] { new GrantedAuthorityImpl("SOME_ROLE") });
|
||||
|
||||
// Build an Authentication object we simulate our Authentication changed it to
|
||||
PrincipalAcegiUserToken updatedPrincipal = new PrincipalAcegiUserToken("key",
|
||||
"someone", "password",
|
||||
new GrantedAuthority[] {new GrantedAuthorityImpl("SOME_DIFFERENT_ROLE")});
|
||||
new GrantedAuthority[] {
|
||||
new GrantedAuthorityImpl("SOME_DIFFERENT_ROLE")
|
||||
});
|
||||
|
||||
// Build a Context to store in HttpSession (simulating prior request)
|
||||
SecurityContext sc = new SecurityContextImpl();
|
||||
|
@ -169,7 +163,9 @@ public class HttpSessionContextIntegrationFilterTests extends TestCase {
|
|||
// Build an Authentication object we simulate our Authentication changed it to
|
||||
PrincipalAcegiUserToken updatedPrincipal = new PrincipalAcegiUserToken("key",
|
||||
"someone", "password",
|
||||
new GrantedAuthority[] {new GrantedAuthorityImpl("SOME_DIFFERENT_ROLE")});
|
||||
new GrantedAuthority[] {
|
||||
new GrantedAuthorityImpl("SOME_DIFFERENT_ROLE")
|
||||
});
|
||||
|
||||
// Build a mock request
|
||||
MockHttpServletRequest request = new MockHttpServletRequest();
|
||||
|
@ -217,7 +213,9 @@ public class HttpSessionContextIntegrationFilterTests extends TestCase {
|
|||
// Build an Authentication object we simulate our Authentication changed it to
|
||||
PrincipalAcegiUserToken updatedPrincipal = new PrincipalAcegiUserToken("key",
|
||||
"someone", "password",
|
||||
new GrantedAuthority[] {new GrantedAuthorityImpl("SOME_DIFFERENT_ROLE")});
|
||||
new GrantedAuthority[] {
|
||||
new GrantedAuthorityImpl("SOME_DIFFERENT_ROLE")
|
||||
});
|
||||
|
||||
// Build a mock request
|
||||
MockHttpServletRequest request = new MockHttpServletRequest();
|
||||
|
@ -251,8 +249,6 @@ public class HttpSessionContextIntegrationFilterTests extends TestCase {
|
|||
filter.destroy();
|
||||
}
|
||||
|
||||
//~ Inner Classes ==========================================================
|
||||
|
||||
private class MockFilterChain extends TestCase implements FilterChain {
|
||||
private Authentication changeContextHolder;
|
||||
private Authentication expectedOnContextHolder;
|
||||
|
@ -265,7 +261,8 @@ public class HttpSessionContextIntegrationFilterTests extends TestCase {
|
|||
this.toThrowDuringChain = toThrowDuringChain;
|
||||
}
|
||||
|
||||
private MockFilterChain() {}
|
||||
private MockFilterChain() {
|
||||
}
|
||||
|
||||
public void doFilter(ServletRequest arg0, ServletResponse arg1)
|
||||
throws IOException, ServletException {
|
||||
|
|
Loading…
Reference in New Issue