Skip to content
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

andhow-junit5-extensions should not be a dependency of andhow-core #739

Open
eeverman opened this issue Oct 14, 2022 · 0 comments
Open

andhow-junit5-extensions should not be a dependency of andhow-core #739

eeverman opened this issue Oct 14, 2022 · 0 comments
Milestone

Comments

@eeverman
Copy link
Owner

Currently, andhow-core has a dependency on andhow-junit5-extensions so that core can use some of the junit5 annotations in core tests. This makes it very tricky to write additional extensions that integrate with the AndHow API because andhow-junit5-extensions cannot depend on andhow-core (that would be cyclical).

This dependency should go the other way: andhow-junit5-extensions should have an optional dependency on andhow-core. That would mean that AndHow could not use the junit5 extensions, but that would be worth fixing to add more full featured extensions.

Proposed changes:

  • Split the junit5-extensions into two modules:
    • junit5-extensions-standalone with no dependency on AndHow (this is possible for many of them). Move as much of the current junit5 code as possible into this module.
    • junit5-extensions-andhow with a dependency on AndHow
  • Update andhow-core to use only junit5-extensions-standalone (not andhow-junit5-extensions). This will have minimal impact
  • Rewrite the KillAndHowBeforeThisTest annotation to become a standalone annotation in the test package of andhow-core. It could be build on some shared code from junit5-extensions-standalone.
  • Look at the test-stubs module - with this new arrangement, is it still needed? Part/all of its original purpose was to allow testing of andhow-junit5-extensions without requiring a dependency on andhow-core.
  • Rewrite the junit5-extensions-standalone module to just bundle to the two modules together as a single jar (similar to the andhow module)
@eeverman eeverman added this to the 1.5.1 milestone Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant