File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
src/main/resources/META-INF/rewrite Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -1010,6 +1010,35 @@ examples:
10101010 language: java
10111011 ---
10121012type : specs.openrewrite.org/v1beta/example
1013+ recipeName : org.openrewrite.java.testing.assertj.SimplifySequencedCollectionAssertions
1014+ examples :
1015+ - description : ' `SimplifySequencedCollectionAssertionsTest#getLast`'
1016+ sources :
1017+ - before : |
1018+ import java.util.List;
1019+
1020+ import static org.assertj.core.api.Assertions.assertThat;
1021+
1022+ class MyTest {
1023+ void testMethod() {
1024+ List<String> list = List.of("a", "b", "c");
1025+ assertThat(list.getLast()).isEqualTo("c");
1026+ }
1027+ }
1028+ after: |
1029+ import java.util.List;
1030+
1031+ import static org.assertj.core.api.Assertions.assertThat;
1032+
1033+ class MyTest {
1034+ void testMethod() {
1035+ List<String> list = List.of("a", "b", "c");
1036+ assertThat(list).last().isEqualTo("c");
1037+ }
1038+ }
1039+ language: java
1040+ ---
1041+ type : specs.openrewrite.org/v1beta/example
10131042recipeName : org.openrewrite.java.testing.assertj.StaticImports
10141043examples :
10151044- description : ' `StaticImportsTest#useStaticImports`'
You can’t perform that action at this time.
0 commit comments