Skip to content

Commit

Permalink
unittest for #50 (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfscholte authored Nov 23, 2024
1 parent ef003c8 commit b7eff90
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/java/com/thoughtworks/qdox/EnumsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,22 @@ public void testMethodInvocation()
new JavaProjectBuilder().addSource(new StringReader(source));
}


@Test
public void testEnumWithLambdaParameter() {

String source = "public class ClassToTest {\n"
+ " public static enum Display {\n"
+ " LOWVALUE(v -> v.toLowerCase() + \"_\");\n"
+ "\n"
+ " final Function<String, String> convert;\n"
+ "\n"
+ " private Display(final Function<String, String> convert) {\n"
+ " this.convert = convert;\n"
+ " }\n"
+ " }\n"
+ "}";

new JavaProjectBuilder().addSource(new StringReader(source));
}
}

0 comments on commit b7eff90

Please sign in to comment.