Start AssertJ Migration
Issue gh-3175
This commit is contained in:
+3
-3
@@ -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) {
|
||||
|
||||
+4
-4
@@ -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) {
|
||||
|
||||
+2
-2
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ public class ProtectPointcutPerformanceTests implements ApplicationContextAware
|
||||
}
|
||||
}
|
||||
sw.stop();
|
||||
// assertTrue(sw.getTotalTimeMillis() < 1000);
|
||||
// assertThat(sw.getTotalTimeMillis() < 1000).isTrue();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user