Skip to content

Commit

Permalink
chore: add some examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kunli2 committed May 5, 2023
1 parent b9a0475 commit 1f35cd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ void method() {
System.out.println("Hello!");
}
}
language: "java"
language: java
""".getBytes()
), URI.create("attribution/test.ChangeTextToHello.yml"), new Properties()))
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package org.openrewrite.java.cleanup;

import org.junit.jupiter.api.Test;
import org.openrewrite.DocumentExample;
import org.openrewrite.config.Environment;
import org.openrewrite.test.RecipeSpec;
import org.openrewrite.test.RewriteTest;
Expand Down Expand Up @@ -46,6 +47,7 @@ void validation() {
).validate().isInvalid()).isTrue();
}

@DocumentExample
@Test
void inOutVariance() {
rewriteRun(
Expand Down Expand Up @@ -106,6 +108,7 @@ void test(Function<? super In, ? extends Out> f) {
);
}

@DocumentExample
@Test
void invariance() {
rewriteRun(
Expand Down

0 comments on commit 1f35cd8

Please sign in to comment.