r***@gmail.com
2017-07-06 02:06:54 UTC
Hi,
I want to be able to test my JPA persistence layer and some code that is
based on it. I am using Weld 3.0 and Deltaspike to integrate JPA and
@Transactional behavior
I managed to statr/stop container, inject any dependencies into a test
instances via TestNG annotated methods - it works. But it is lame because I
could not find a way to use CDI to actually instantiate test as beans so
TestNG is in charge of test instantiation and creates it without the
benefit of CDI and thus @Transactional is not working. Is there any way to
customize TesNG to delegate test instantiation to CDI? I saw Guice
integration (did not explore it) but nothing about CDI
Or any other way to integrate transactional. I guess I could use one of the
TestNG listeners to star/stop transactions for transitionally annotated
test methods but I was hoping for a more complete solution where TestNG
lets me intercept test instantiation before dong all of its things with it
and invoking its methods
Thanks
Alex
I want to be able to test my JPA persistence layer and some code that is
based on it. I am using Weld 3.0 and Deltaspike to integrate JPA and
@Transactional behavior
I managed to statr/stop container, inject any dependencies into a test
instances via TestNG annotated methods - it works. But it is lame because I
could not find a way to use CDI to actually instantiate test as beans so
TestNG is in charge of test instantiation and creates it without the
benefit of CDI and thus @Transactional is not working. Is there any way to
customize TesNG to delegate test instantiation to CDI? I saw Guice
integration (did not explore it) but nothing about CDI
Or any other way to integrate transactional. I guess I could use one of the
TestNG listeners to star/stop transactions for transitionally annotated
test methods but I was hoping for a more complete solution where TestNG
lets me intercept test instantiation before dong all of its things with it
and invoking its methods
Thanks
Alex
--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-dev+***@googlegroups.com.
To post to this group, send email to testng-***@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-dev+***@googlegroups.com.
To post to this group, send email to testng-***@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/d/optout.