Releases: weld/weld-testing
4.0.3.Final
What's Changed
- auto-detect @Inject method parameter types by @dev-qnz in #172
- Release automation by @manovotn in #176
- Bump actions/cache from 3 to 4 by @dependabot in #181
- Bump actions/upload-artifact from 3 to 4 by @dependabot in #180
- Bump actions/setup-java from 3.12.0 to 4.2.1 by @dependabot in #179
- Bump version.junit.jupiter from 5.10.0 to 5.10.2 by @dependabot in #177
- Bump org.apache.logging.log4j:log4j-core from 2.17.2 to 2.23.1 by @dependabot in #178
- Bump org.mockito:mockito-core from 4.4.0 to 5.11.0 by @dependabot in #182
- Bump org.spockframework:spock-core from 2.1-groovy-3.0 to 2.3-groovy-4.0 by @dependabot in #183
- Release 4.0.3.Final by @manovotn in #185
Full Changelog: 4.0.2.Final...4.0.3.Final
4.0.2.Final
What's Changed
- junit parameter resolver by @dev-qnz in #163
- @ExplicitParameterInjection is now by default inherited for nested classes by @manovotn in #166
- Clarify that WeldInitiator.from() and WeldInitiator.of() should use the same variable scope by @manovotn in #168
- Do not greedily inject @ParameterizedTest; instead treat is as explicit param. injection by @manovotn in #170
New Contributors
Full Changelog: 4.0.1.Final...4.0.2.Final
4.0.1.Final
What's Changed
- fix issue #149; make method parameter injection work for parametrized types by @JHahnHRO in #152
- Introduce annotation for changing bean discovery mode in synthetic archive by @manovotn in #159
- Various dep updates, formatting, CI updates by @manovotn in #161
Full Changelog: 4.0.0.Final...4.0.1.Final
4.0.0.Final - Weld 5 and Jakarta EE 10
Version 4.0.0.Final of this library is now available in Maven Central.
There are a few smaller tweaks but generally the bulk of changes for this major version is adaptation to Weld 5/ CDI 4.
The good news is that your tests should stay mostly unaffected.
One notable addition is that there is now a dedicated module for Spock testing framework offering similar functionalities as our JUnit extensions.
You can read more about that here and if you browse the module, there are plenty of tests showcasing how it works.
In case you encounter any issues testing your CDI 4 apps with this new framework, do let us know via GH issues.
3.1.0.Final
Version 3 of this library keeps supporting Weld 4, Jakarta EE 9.
While there are no significant changes to JUnit extensions, the minor version bump is due to the addition of Spock support.
If you want to learn more, the README file captures it nicely.
Note that unless there are severe bugs, we are not planning any further releases for 3.x branch due to the fact that the Weld version is it designed for has entered maintenance mode as well.
We of course keep supporting newer versions and have already released 4.0.0.Final of this library which is tailored for Weld 5 (Jakarta EE 10).
4.0.0.CR1 - Weld 5 and CDI 4.0 release of weld-junit
A new major version for weld-junit that supports Weld 5 and CDI 4.
The specification is undergoing a final ballot and Weld has a CR release so even this release is not yet Final but should work just fine.
As for code in weld-junit, there are no breaking changes.
However, CDI/Weld has a few notable changes, following links should provide a nice overview:
3.0.0.Final - Jakarta EE 9 variant of weld-junit
This new major version switches to EE 9 meaning it supports and uses Weld 4/CDI 3.0 and with it the jakarta
namespace.
Otherwise it brings no functional changes over the latest 2.x
release.
Note that this also means that anyone who needs to still run on top of older versions/namespaces will have to keep using version 2.x
which we now have a branch for and which will keep getting updated as well.
If you find any issues, please report them via GH issues and we'll into them as soon as possible.
Happy testing!
2.0.2.Final
This new version brings few more polishments and QoL updates. Let's take a look at those:
MockBean
now correctly adds@Any
qualifier- Allow injection into test classes when using
@ClassRule
- CDI contexts are now activated prior to any injection attempts
@EnableAutoWeld
now scans injectedInstance<SomeClass>
fields for bean candidates@EnableAutoWeld
now correctly respects inherited injected fields and considers their types beans- Extension now uses Weld 3.1.6.Final by default
- Make use of new JUnit APIs to improve extension lifecycle and annotation handling
- Several updates to README files to make them more user-friendly and accurate
2.0.1.Final
This is a small release with sole purpose of bumping the Weld version in weld-junit to 3.1.2.Final.
This hopefully solves the problems people were having when running on newer JDKs and remove the need to override some internal dependencies brought in by Weld.
2.0.0.Final
We have a new major version in which we are dropping support CDI 1.2 (Weld 2.4) and fully moving to CDI 2.0 (Weld 3). Apart from that, this release brings:
- Removal of
@OverrideBean
, as it effectively duplicating what can be achieved by declaring an alternative - Introduction of
@ExcludeBean
and@ExcludeBeanClasses
which allow to exclude some classes from automatic discovery and replace them with ad-hoc producers - Users can now define
MockBean
with priority, making it a globally enabled alternative - Synthetic bean archive now adds a dummy bean in case there is an alternative enabled to avoid a corner case where the archive would be considered empty if no other bean than alternative was present
- Update to JUnit versions used internally