mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-28 23:02:15 +00:00
Clean up code to conform to basic checkstyle
Issue: gh-6078
This commit is contained in:
parent
d05ad19276
commit
14c2d96c86
@ -60,16 +60,16 @@ public class CookieClearingLogoutHandlerTests {
|
|||||||
assertThat(c.getMaxAge()).isZero();
|
assertThat(c.getMaxAge()).isZero();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void passedInCookiesAreCleared() {
|
public void passedInCookiesAreCleared() {
|
||||||
MockHttpServletResponse response = new MockHttpServletResponse();
|
MockHttpServletResponse response = new MockHttpServletResponse();
|
||||||
MockHttpServletRequest request = new MockHttpServletRequest();
|
MockHttpServletRequest request = new MockHttpServletRequest();
|
||||||
request.setContextPath("/foo/bar");
|
request.setContextPath("/foo/bar");
|
||||||
Cookie cookie1 = new Cookie("my_cookie",null);
|
Cookie cookie1 = new Cookie("my_cookie", null);
|
||||||
cookie1.setPath("/foo");
|
cookie1.setPath("/foo");
|
||||||
cookie1.setMaxAge(0);
|
cookie1.setMaxAge(0);
|
||||||
Cookie cookie2 = new Cookie("my_cookie_too",null);
|
Cookie cookie2 = new Cookie("my_cookie_too", null);
|
||||||
cookie2.setPath("/foo");
|
cookie2.setPath("/foo");
|
||||||
cookie2.setMaxAge(0);
|
cookie2.setMaxAge(0);
|
||||||
CookieClearingLogoutHandler handler = new CookieClearingLogoutHandler(cookie1, cookie2);
|
CookieClearingLogoutHandler handler = new CookieClearingLogoutHandler(cookie1, cookie2);
|
||||||
@ -80,13 +80,13 @@ public class CookieClearingLogoutHandlerTests {
|
|||||||
assertThat(c.getMaxAge()).isZero();
|
assertThat(c.getMaxAge()).isZero();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected=IllegalArgumentException.class)
|
@Test(expected=IllegalArgumentException.class)
|
||||||
public void invalidAge() {
|
public void invalidAge() {
|
||||||
MockHttpServletResponse response = new MockHttpServletResponse();
|
MockHttpServletResponse response = new MockHttpServletResponse();
|
||||||
MockHttpServletRequest request = new MockHttpServletRequest();
|
MockHttpServletRequest request = new MockHttpServletRequest();
|
||||||
request.setContextPath("/foo/bar");
|
request.setContextPath("/foo/bar");
|
||||||
Cookie cookie1 = new Cookie("my_cookie",null);
|
Cookie cookie1 = new Cookie("my_cookie", null);
|
||||||
cookie1.setPath("/foo");
|
cookie1.setPath("/foo");
|
||||||
cookie1.setMaxAge(100);
|
cookie1.setMaxAge(100);
|
||||||
CookieClearingLogoutHandler handler = new CookieClearingLogoutHandler(cookie1);
|
CookieClearingLogoutHandler handler = new CookieClearingLogoutHandler(cookie1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user