From e59c664d22e0267a59ec9203af4b46d23cca2544 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 8 Feb 2021 20:20:06 +0800 Subject: [PATCH 1/4] Grouping assertions Signed-off-by: Elvys Soares --- .../run/halo/app/conf/AntPathMatcherTest.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/test/java/run/halo/app/conf/AntPathMatcherTest.java b/src/test/java/run/halo/app/conf/AntPathMatcherTest.java index 20b30a1271..f961fc591a 100644 --- a/src/test/java/run/halo/app/conf/AntPathMatcherTest.java +++ b/src/test/java/run/halo/app/conf/AntPathMatcherTest.java @@ -1,11 +1,10 @@ package run.halo.app.conf; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; - import org.junit.jupiter.api.Test; import org.springframework.util.AntPathMatcher; +import static org.junit.jupiter.api.Assertions.*; + /** * Ant path matcher test. * @@ -17,10 +16,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")) + ); } } From c5c39d46cde51906282cbc635d0c87fc4f28559f Mon Sep 17 00:00:00 2001 From: Elvys Soares Date: Wed, 17 Feb 2021 15:27:37 -0300 Subject: [PATCH 2/4] Grouping assertions Signed-off-by: Elvys Soares --- src/test/java/run/halo/app/conf/AntPathMatcherTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/run/halo/app/conf/AntPathMatcherTest.java b/src/test/java/run/halo/app/conf/AntPathMatcherTest.java index f961fc591a..7712a61340 100644 --- a/src/test/java/run/halo/app/conf/AntPathMatcherTest.java +++ b/src/test/java/run/halo/app/conf/AntPathMatcherTest.java @@ -3,7 +3,9 @@ import org.junit.jupiter.api.Test; import org.springframework.util.AntPathMatcher; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertAll; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; /** * Ant path matcher test. From 8e0b704b212d045f4da7264f385deb1d98c878dc Mon Sep 17 00:00:00 2001 From: Elvys Soares Date: Wed, 17 Feb 2021 15:41:23 -0300 Subject: [PATCH 3/4] Grouping assertions Signed-off-by: Elvys Soares --- src/test/java/run/halo/app/conf/AntPathMatcherTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/run/halo/app/conf/AntPathMatcherTest.java b/src/test/java/run/halo/app/conf/AntPathMatcherTest.java index 7712a61340..35e95e1f7b 100644 --- a/src/test/java/run/halo/app/conf/AntPathMatcherTest.java +++ b/src/test/java/run/halo/app/conf/AntPathMatcherTest.java @@ -1,12 +1,12 @@ package run.halo.app.conf; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertAll; + import org.junit.jupiter.api.Test; import org.springframework.util.AntPathMatcher; -import static org.junit.jupiter.api.Assertions.assertAll; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.assertFalse; - /** * Ant path matcher test. * From 66a76deac30a8969bc4562681ece5bb7b0e2710a Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Fri, 19 Feb 2021 21:09:09 +0800 Subject: [PATCH 4/4] fix: code style check. --- src/test/java/run/halo/app/conf/AntPathMatcherTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/run/halo/app/conf/AntPathMatcherTest.java b/src/test/java/run/halo/app/conf/AntPathMatcherTest.java index 35e95e1f7b..3ed765c568 100644 --- a/src/test/java/run/halo/app/conf/AntPathMatcherTest.java +++ b/src/test/java/run/halo/app/conf/AntPathMatcherTest.java @@ -1,8 +1,8 @@ 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; -import static org.junit.jupiter.api.Assertions.assertAll; import org.junit.jupiter.api.Test; import org.springframework.util.AntPathMatcher;