Skip to content

Commit

Permalink
Fix a few more missing types in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Sep 27, 2023
1 parent ac6d3f2 commit 0b0df94
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class Test {
List collection = null;
class Nested {
Object collection = Test.this.collection;
Object collection2 = A.this.collection;
Object collection2 = new A().collection;
}
}
""",
Expand All @@ -197,7 +197,7 @@ class Test {
List list = null;
class Nested {
Object collection = Test.this.list;
Object collection2 = A.this.collection;
Object collection2 = new A().collection;
}
}
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.openrewrite.style.NamedStyles;
import org.openrewrite.test.RecipeSpec;
import org.openrewrite.test.RewriteTest;
import org.openrewrite.test.TypeValidation;

import java.util.function.Consumer;
import java.util.function.UnaryOperator;
Expand Down Expand Up @@ -942,6 +943,7 @@ class Test {
@Test
void moreAnnotations() {
rewriteRun(
spec -> spec.typeValidationOptions(TypeValidation.none()),
java(
"""
import lombok.EqualsAndHashCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.openrewrite.DocumentExample;
import org.openrewrite.test.RecipeSpec;
import org.openrewrite.test.RewriteTest;
import org.openrewrite.test.SourceSpec;

import static org.openrewrite.java.Assertions.java;

Expand Down Expand Up @@ -75,7 +76,8 @@ void test() {
String target();
}
"""
""",
SourceSpec::skip
),
java(
"""
Expand All @@ -91,7 +93,18 @@ void test() {
public @interface ValueMappings {
ValueMapping[] value();
}
"""
""",
SourceSpec::skip
),
java(
"""
package org.mapstruct;
public class MappingConstants {
public static final String NULL = "null";
}
""",
SourceSpec::skip
)
);
}
Expand Down

0 comments on commit 0b0df94

Please sign in to comment.