Closed exabrial closed 1 hour ago
How would I use this one if it is not in the library?
@KirillGrishin I think you just need to add this to your test class:
@AdditionalClasses(AtResourceInjectionCDIExtension.class)
Great, just what I was looking for and works fine - thanks!
@seanf Thanks, it looks to be processing it now! May I ask another question? How do I inject String resources for tests?
@Resource(name = "PROPERTIES_PATH")
private String propertiesFilePath;
I would recommend Sabot for that: https://tomitribe.io/projects/sabot
Hello, at our company we faced similar problems and solved them using cdi-unit together with an additional Modul that extended the EjbExtension class and added some classes which help with transactionmanagement and queue-simulation. Perhaps you would like to take a look: ejb-cdi-unit
Currently cdi-unit does not support
@Resource
injection. Here is a simple CDI Extension that covers a huge amount of use cases: