16
16
package example .springdata .rest .security ;
17
17
18
18
import static org .hamcrest .CoreMatchers .*;
19
- import static org .junit . Assert .* ;
19
+ import static org .hamcrest . MatcherAssert . assertThat ;
20
20
import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .*;
21
21
import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .*;
22
22
import static org .springframework .test .web .servlet .setup .MockMvcBuilders .*;
23
23
24
24
import java .util .Base64 ;
25
25
26
- import org .junit .Before ;
27
- import org .junit .Test ;
28
- import org .junit .runner .RunWith ;
26
+ import org .junit .jupiter .api .BeforeEach ;
27
+ import org .junit .jupiter .api .Test ;
29
28
import org .springframework .beans .factory .annotation .Autowired ;
30
29
import org .springframework .boot .test .context .SpringBootTest ;
31
30
import org .springframework .hateoas .MediaTypes ;
32
31
import org .springframework .http .HttpHeaders ;
33
32
import org .springframework .http .MediaType ;
34
33
import org .springframework .security .core .context .SecurityContextHolder ;
35
34
import org .springframework .security .web .FilterChainProxy ;
36
- import org .springframework .test .context .junit4 .SpringRunner ;
37
35
import org .springframework .test .web .servlet .MockMvc ;
38
36
import org .springframework .web .context .WebApplicationContext ;
39
37
45
43
* @author Greg Turnquist
46
44
* @author Oliver Gierke
47
45
*/
48
- @ RunWith (SpringRunner .class )
49
46
@ SpringBootTest
50
47
public class UrlLevelSecurityTests {
51
48
@@ -56,7 +53,7 @@ public class UrlLevelSecurityTests {
56
53
57
54
MockMvc mvc ;
58
55
59
- @ Before
56
+ @ BeforeEach
60
57
public void setUp () {
61
58
62
59
this .mvc = webAppContextSetup (context ).addFilters (filterChain ).build ();
0 commit comments