-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Test alongside Lombok's @Delegate annotation?! #1457
Comments
JUnit runs the methods annotated with Also, on JUnit4 side additional ways to discover tests can be implemented in an runner. Another approach would be posting a question on StackOverflow and describing the problem your trying to solve instead of a particular approach. You might get some new ideas then. |
My idea of posting this here, is about to show how |
We would be unlikely to add support for.Lombok in JUnit 4.x (we currently still depend on JDK 5!) If you cannot generate methods annotated with It is possible that JUnit 5 would have better extension points for allowing you identify these methods as test methods. |
Guys, I repost my issue with Lombok and JUnit.
Issue: projectlombok/lombok#1356
I believe It's a cool feature actually (saves me alot of time, but need to workaround the
@Test
annotation limitation):Original
Hi, guys!
I'm mixing-in a "template" test into an "origin" test.
Something like:
(Note: I omitted a way I pass MyTest context to the Mixin - it's an important part, but irrelevant to the issue subject.)
So, the question is:
How do I make JUnit discover the
testSomething()
of the origin, generated by@Delegate
, as a test - like it was annotated with@Test
?Followup
So, guys, how hard is it to allow
@Test
annotation near the@Delegate
one?:I guess, adding an
onMethod
to@Delegate
is a dream come true:The text was updated successfully, but these errors were encountered: