Skip to content

Add Junit5-params dependency for projects without it when needed #620 #829

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

Merged

Conversation

volivan239
Copy link
Collaborator

Description

Now libraries are configured properly when generating parametrized tests with Junit 5:

  • If user has already installed any of junit libraries as dependency, check for junit-jupiter or junit-jupiter-params libraries and if neither of them is installed, install junit-jupiter-params
  • If user has no junit libraries, install junit-jupiter (behavior in this case is the same as before PR)

Fixes #620

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Manual Scenario

Scenarios on which behavior was checked:

  1. User has junit-jupiter-api and junit-jupiter-engine dependency -- junit-jupiter-params dependency is added
  2. User has all three dependencies from previous case -- nothing added
  3. User has junit-jupiter dependency -- nothing added
  4. User has no dependencies -- junit-jupiter dependency is added

Checklist (remove irrelevant options):

This is the author self-check list

  • The change followed the style guidelines of the UTBot project
  • Self-review of the code is passed
  • The change contains enough commentaries, particularly in hard-to-understand areas
  • New documentation is provided or existed one is altered
  • No new warnings
  • New tests have been added
  • All tests pass locally with my changes

@volivan239 volivan239 marked this pull request as ready for review August 31, 2022 13:53
@EgorkaKulikov EgorkaKulikov enabled auto-merge (squash) September 2, 2022 12:44
@volivan239 volivan239 force-pushed the volivan239/autoadd_junit5_params_dependency_in_plugin branch from 35ce850 to 4d52183 Compare September 2, 2022 13:02
@EgorkaKulikov EgorkaKulikov merged commit 68a65ea into main Sep 2, 2022
@EgorkaKulikov EgorkaKulikov deleted the volivan239/autoadd_junit5_params_dependency_in_plugin branch September 2, 2022 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

JUnit5 params dependency is required in default IDEA's Gradle project
2 participants