Skip to content

Commit fa8a90c

Browse files
committed
Sort members
1 parent c140fc8 commit fa8a90c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/test/java/org/apache/commons/lang3/compare/ObjectToStringComparatorTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,36 +47,36 @@ public String toString() {
4747
}
4848

4949
@Test
50-
void testNulls() {
50+
void testNullLeft() {
5151
final Thing thing = new Thing("y");
52-
final List<Thing> things = Arrays.asList(null, thing, null);
52+
final List<Thing> things = Arrays.asList(null, thing);
5353
things.sort(ObjectToStringComparator.INSTANCE);
5454
assertEquals("y", things.get(0).string);
55-
assertEquals(3, things.size());
55+
assertEquals(2, things.size());
5656
assertSame(thing, things.get(0));
5757
assertNull(things.get(1));
58-
assertNull(things.get(2));
5958
}
6059

6160
@Test
62-
void testNullLeft() {
61+
void testNullRight() {
6362
final Thing thing = new Thing("y");
64-
final List<Thing> things = Arrays.asList(null, thing);
63+
final List<Thing> things = Arrays.asList(thing, null);
6564
things.sort(ObjectToStringComparator.INSTANCE);
66-
assertEquals("y", things.get(0).string);
6765
assertEquals(2, things.size());
6866
assertSame(thing, things.get(0));
6967
assertNull(things.get(1));
7068
}
7169

7270
@Test
73-
void testNullRight() {
71+
void testNulls() {
7472
final Thing thing = new Thing("y");
75-
final List<Thing> things = Arrays.asList(thing, null);
73+
final List<Thing> things = Arrays.asList(null, thing, null);
7674
things.sort(ObjectToStringComparator.INSTANCE);
77-
assertEquals(2, things.size());
75+
assertEquals("y", things.get(0).string);
76+
assertEquals(3, things.size());
7877
assertSame(thing, things.get(0));
7978
assertNull(things.get(1));
79+
assertNull(things.get(2));
8080
}
8181

8282
@Test

0 commit comments

Comments
 (0)