This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-lang.git
commit d6b7a47e894556a4cd2b7709fc4ff45dbb373f5f Author: Gary D. Gregory <garydgreg...@gmail.com> AuthorDate: Sat Jun 14 07:21:23 2025 -0400 Rename test method to match method under test --- .../commons/lang3/tuple/ImmutableTripleTest.java | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/tuple/ImmutableTripleTest.java b/src/test/java/org/apache/commons/lang3/tuple/ImmutableTripleTest.java index 550fff9ea..218de8f7e 100644 --- a/src/test/java/org/apache/commons/lang3/tuple/ImmutableTripleTest.java +++ b/src/test/java/org/apache/commons/lang3/tuple/ImmutableTripleTest.java @@ -118,6 +118,24 @@ void testNullTripleTyped() { assertNotNull(triple); } + @Test + void testOf() { + final ImmutableTriple<Integer, String, Boolean> triple = ImmutableTriple.of(0, "foo", Boolean.FALSE); + assertEquals(0, triple.left.intValue()); + assertEquals(0, triple.getLeft().intValue()); + assertEquals("foo", triple.middle); + assertEquals("foo", triple.getMiddle()); + assertEquals(Boolean.FALSE, triple.right); + assertEquals(Boolean.FALSE, triple.getRight()); + final ImmutableTriple<Object, String, Boolean> triple2 = ImmutableTriple.of(null, "bar", Boolean.TRUE); + assertNull(triple2.left); + assertNull(triple2.getLeft()); + assertEquals("bar", triple2.middle); + assertEquals("bar", triple2.getMiddle()); + assertEquals(Boolean.TRUE, triple2.right); + assertEquals(Boolean.TRUE, triple2.getRight()); + } + @Test void testOfNonNull() { assertThrows(NullPointerException.class, () -> ImmutableTriple.ofNonNull(null, null, null)); @@ -150,24 +168,6 @@ void testToString() { assertEquals("(one,two,three)", MutableTriple.of("one", "two", "three").toString()); } - @Test - void testTripleOf() { - final ImmutableTriple<Integer, String, Boolean> triple = ImmutableTriple.of(0, "foo", Boolean.FALSE); - assertEquals(0, triple.left.intValue()); - assertEquals(0, triple.getLeft().intValue()); - assertEquals("foo", triple.middle); - assertEquals("foo", triple.getMiddle()); - assertEquals(Boolean.FALSE, triple.right); - assertEquals(Boolean.FALSE, triple.getRight()); - final ImmutableTriple<Object, String, Boolean> triple2 = ImmutableTriple.of(null, "bar", Boolean.TRUE); - assertNull(triple2.left); - assertNull(triple2.getLeft()); - assertEquals("bar", triple2.middle); - assertEquals("bar", triple2.getMiddle()); - assertEquals(Boolean.TRUE, triple2.right); - assertEquals(Boolean.TRUE, triple2.getRight()); - } - @Test void testUseAsKeyOfHashMap() { final HashMap<ImmutableTriple<Object, Object, Object>, String> map = new HashMap<>();