You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2022/01/19 15:07:37 UTC

[logging-log4j2] 01/02: Sort test methods.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 338cd96ead0d498f22bb6745aa076837842d9468
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Jan 19 10:02:02 2022 -0500

    Sort test methods.
---
 .../org/apache/logging/log4j/util/StringsTest.java | 40 +++++++++++-----------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/util/StringsTest.java b/log4j-api/src/test/java/org/apache/logging/log4j/util/StringsTest.java
index 78b797a..c037d4b 100644
--- a/log4j-api/src/test/java/org/apache/logging/log4j/util/StringsTest.java
+++ b/log4j-api/src/test/java/org/apache/logging/log4j/util/StringsTest.java
@@ -28,11 +28,21 @@ import static org.junit.jupiter.api.Assertions.*;
 public class StringsTest {
 
     @Test
-    public void testIsEmpty() {
-        assertTrue(Strings.isEmpty(null));
-        assertTrue(Strings.isEmpty(""));
-        assertFalse(Strings.isEmpty(" "));
-        assertFalse(Strings.isEmpty("a"));
+    public void testConcat() {
+        assertEquals("ab", Strings.concat("a", "b"));
+        assertEquals("a", Strings.concat("a", ""));
+        assertEquals("a", Strings.concat("a", null));
+        assertEquals("b", Strings.concat("", "b"));
+        assertEquals("b", Strings.concat(null, "b"));
+    }
+
+    /**
+     * A sanity test to make sure a typo does not mess up {@link Strings#EMPTY}.
+     */
+    @Test
+    public void testEMPTY() {
+        assertEquals("", Strings.EMPTY);
+        assertEquals(0, Strings.EMPTY.length());
     }
 
     @Test
@@ -46,22 +56,12 @@ public class StringsTest {
         assertFalse(Strings.isEmpty("a"));
     }
 
-    /**
-     * A sanity test to make sure a typo does not mess up {@link Strings#EMPTY}.
-     */
-    @Test
-    public void testEMPTY() {
-        assertEquals("", Strings.EMPTY);
-        assertEquals(0, Strings.EMPTY.length());
-    }
-
     @Test
-    public void testConcat() {
-        assertEquals("ab", Strings.concat("a", "b"));
-        assertEquals("a", Strings.concat("a", ""));
-        assertEquals("a", Strings.concat("a", null));
-        assertEquals("b", Strings.concat("", "b"));
-        assertEquals("b", Strings.concat(null, "b"));
+    public void testIsEmpty() {
+        assertTrue(Strings.isEmpty(null));
+        assertTrue(Strings.isEmpty(""));
+        assertFalse(Strings.isEmpty(" "));
+        assertFalse(Strings.isEmpty("a"));
     }
 
     @Test