Skip to content

Commit 420b75e

Browse files
committed
feat: 增加一个rightJoin排序的测试
1 parent a94c991 commit 420b75e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/java/com/github/lokic/javaplus/join/JoinTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ public void test_rightOuterJoin() {
7272
.containsExactly(Tuple.of(2, "2"), Tuple.of(3, "3"), Tuple.of(null, "5"));
7373
}
7474

75+
@Test
76+
public void test_order_rightOuterJoin() {
77+
List<Tuple2<Integer, String>> list = Join.stream(Stream.of(1, 2, 3, 4))
78+
.rightOuterJoin(Stream.of("3", "2", "5"), on(i -> String.valueOf(i), Function.identity()))
79+
.stream()
80+
.collect(Collectors.toList());
81+
82+
Assertions.assertThat(list)
83+
.containsExactly(Tuple.of(3, "3"), Tuple.of(2, "2"), Tuple.of(null, "5"));
84+
}
85+
7586

7687
@Test
7788
public void test_fullOuterJoin() {

0 commit comments

Comments
 (0)