diff --git a/src/test/java/run/halo/app/conf/AntPathMatcherTest.java b/src/test/java/run/halo/app/conf/AntPathMatcherTest.java index 20b30a1271..3ed765c568 100644 --- a/src/test/java/run/halo/app/conf/AntPathMatcherTest.java +++ b/src/test/java/run/halo/app/conf/AntPathMatcherTest.java @@ -1,5 +1,6 @@ package run.halo.app.conf; +import static org.junit.jupiter.api.Assertions.assertAll; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -17,10 +18,12 @@ class AntPathMatcherTest { @Test void matchTest() { - assertFalse(pathMatcher.match("/admin/?*/**", "/admin")); - assertFalse(pathMatcher.match("/admin/?*/**", "/admin/")); + assertAll( + () -> assertFalse(pathMatcher.match("/admin/?*/**", "/admin")), + () -> assertFalse(pathMatcher.match("/admin/?*/**", "/admin/")), - assertTrue(pathMatcher.match("/admin/?*/**", "/admin/index.html")); - assertTrue(pathMatcher.match("/admin/?*/**", "/admin/index.html/more")); + () -> assertTrue(pathMatcher.match("/admin/?*/**", "/admin/index.html")), + () -> assertTrue(pathMatcher.match("/admin/?*/**", "/admin/index.html/more")) + ); } }