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
Elvys Soares 2021-02-19 10:14:51 -03:00 committed by GitHub
parent b591595541
commit cdc15942cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,6 @@
package run.halo.app.conf; 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.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.assertTrue;
@ -17,10 +18,12 @@ class AntPathMatcherTest {
@Test @Test
void matchTest() { void matchTest() {
assertFalse(pathMatcher.match("/admin/?*/**", "/admin")); assertAll(
assertFalse(pathMatcher.match("/admin/?*/**", "/admin/")); () -> assertFalse(pathMatcher.match("/admin/?*/**", "/admin")),
() -> assertFalse(pathMatcher.match("/admin/?*/**", "/admin/")),
assertTrue(pathMatcher.match("/admin/?*/**", "/admin/index.html")); () -> assertTrue(pathMatcher.match("/admin/?*/**", "/admin/index.html")),
assertTrue(pathMatcher.match("/admin/?*/**", "/admin/index.html/more")); () -> assertTrue(pathMatcher.match("/admin/?*/**", "/admin/index.html/more"))
);
} }
} }