mirror of https://github.com/halo-dev/halo
pref: grouping assertions (#1273)
* Grouping assertions Signed-off-by: Elvys Soares <eas5@cin.ufpe.br> * Grouping assertions Signed-off-by: Elvys Soares <eas5@cin.ufpe.br> * Grouping assertions Signed-off-by: Elvys Soares <eas5@cin.ufpe.br> * fix: code style check. Co-authored-by: Ryan Wang <i@ryanc.cc>pull/1277/head^2
parent
b591595541
commit
cdc15942cf
|
@ -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"))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue