1
0
mirror of synced 2026-08-06 02:08:01 +00:00

Start AssertJ Migration

Issue gh-3175
This commit is contained in:
Rob Winch
2015-12-16 10:38:31 -06:00
parent 6cbb439701
commit bb600a473e
355 changed files with 3036 additions and 3133 deletions
@@ -1,6 +1,6 @@
package org.springframework.security.integration;
import static org.junit.Assert.*;
import static org.assertj.core.api.Assertions.*;
import javax.servlet.http.HttpSession;
@@ -33,7 +33,7 @@ public class HttpNamespaceWithMultipleInterceptorsTests {
request.setSession(createAuthenticatedSession("ROLE_0", "ROLE_1", "ROLE_2"));
MockHttpServletResponse response = new MockHttpServletResponse();
fcp.doFilter(request, response, new MockFilterChain());
assertEquals(200, response.getStatus());
assertThat(response.getStatus()).isEqualTo(200);
}
@Test
@@ -45,7 +45,7 @@ public class HttpNamespaceWithMultipleInterceptorsTests {
request.setSession(createAuthenticatedSession("ROLE_0"));
MockHttpServletResponse response = new MockHttpServletResponse();
fcp.doFilter(request, response, new MockFilterChain());
assertEquals(403, response.getStatus());
assertThat(response.getStatus()).isEqualTo(403);
}
public HttpSession createAuthenticatedSession(String... roles) {
@@ -1,6 +1,6 @@
package org.springframework.security.integration;
import static org.junit.Assert.assertEquals;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -33,7 +33,7 @@ public class HttpPathParameterStrippingTests {
request.setSession(createAuthenticatedSession("ROLE_USER"));
MockHttpServletResponse response = new MockHttpServletResponse();
fcp.doFilter(request, response, new MockFilterChain());
assertEquals(403, response.getStatus());
assertThat(response.getStatus()).isEqualTo(403);
}
@Test
@@ -43,7 +43,7 @@ public class HttpPathParameterStrippingTests {
request.setSession(createAuthenticatedSession("ROLE_USER"));
MockHttpServletResponse response = new MockHttpServletResponse();
fcp.doFilter(request, response, new MockFilterChain());
assertEquals(403, response.getStatus());
assertThat(response.getStatus()).isEqualTo(403);
// Try with pathInfo
request = new MockHttpServletRequest();
@@ -52,7 +52,7 @@ public class HttpPathParameterStrippingTests {
request.setSession(createAuthenticatedSession("ROLE_USER"));
response = new MockHttpServletResponse();
fcp.doFilter(request, response, new MockFilterChain());
assertEquals(403, response.getStatus());
assertThat(response.getStatus()).isEqualTo(403);
}
public HttpSession createAuthenticatedSession(String... roles) {
@@ -1,6 +1,6 @@
package org.springframework.security.integration;
import static org.junit.Assert.*;
import static org.assertj.core.api.Assertions.*;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -18,6 +18,6 @@ public class SEC933ApplicationContextTests {
@Test
public void testSimpleApplicationContextBootstrap() throws Exception {
assertNotNull(userDetailsService);
assertThat(userDetailsService).isNotNull();
}
}
@@ -44,7 +44,7 @@ public class ProtectPointcutPerformanceTests implements ApplicationContextAware
}
}
sw.stop();
// assertTrue(sw.getTotalTimeMillis() < 1000);
// assertThat(sw.getTotalTimeMillis() < 1000).isTrue();
}