File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
src/main/resources/META-INF/rewrite Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -1039,6 +1039,33 @@ examples:
10391039 language: java
10401040 ---
10411041type : specs.openrewrite.org/v1beta/example
1042+ recipeName : org.openrewrite.java.testing.assertj.SimplifyStreamMapToExtracting
1043+ examples :
1044+ - description : ' `SimplifyStreamMapToExtractingTest#streamMapWithMethodReference`'
1045+ sources :
1046+ - before : |
1047+ import java.util.List;
1048+
1049+ import static org.assertj.core.api.Assertions.assertThat;
1050+
1051+ class MyTest {
1052+ void testMethod(List<Row> rows) {
1053+ assertThat(rows.stream().map(Row::getValue)).contains("a");
1054+ }
1055+ }
1056+ after: |
1057+ import java.util.List;
1058+
1059+ import static org.assertj.core.api.Assertions.assertThat;
1060+
1061+ class MyTest {
1062+ void testMethod(List<Row> rows) {
1063+ assertThat(rows).extracting(Row::getValue).contains("a");
1064+ }
1065+ }
1066+ language: java
1067+ ---
1068+ type : specs.openrewrite.org/v1beta/example
10421069recipeName : org.openrewrite.java.testing.assertj.StaticImports
10431070examples :
10441071- description : ' `StaticImportsTest#useStaticImports`'
You can’t perform that action at this time.
0 commit comments