Re: [cdi-unit] JUnit 5.2 not compatible with CDI-Unit

36 views
Skip to first unread message

Sean Flanigan

unread,
Sep 1, 2018, 8:20:55 AM9/1/18
to cdi-...@googlegroups.com
Some months later...

There's a tracking issue for this: https://github.com/BrynCooke/cdi-unit/issues/103

I've been hacking on this, using the JUnit 5.3 release candidate and the new TestInstanceFactory interface (marked experimental).

It looks like it should be mostly possible now, with the IMHO unavoidable caveat that @Nested (inner) test classes won't be real CDI beans. There may or may not be a way of getting interceptors to work with some trickery.

Here's the pull request (still very much a work in progress, warts and all): https://github.com/BrynCooke/cdi-unit/pull/144




On Fri, 8 Jun 2018 at 18:46, Christof Schablinski <b...@schablinski.de> wrote:
Hi,

I just tried to transform CdiRunner into a JUnit 5 Extension. This doesn't work, because the Extension-API currently doesn't allow to replace the test instance created by JUnit with a CDI-Bean instance of the test class as is done in overridden CdiRunner.createTest(). The only way seems to write a new TestEngine implementation. As far as I can tell, the Arquillian team has the same problem, see JUnit 5 enhancement.

Christof


--
You received this message because you are subscribed to the Google Groups "CDI-Unit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cdi-unit+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages