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

Add @CartesianTest.MethodParameterSource #797

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

jpenilla
Copy link
Contributor

@jpenilla jpenilla commented Dec 18, 2023

Implements the feature described in #796.

Proposed commit message:

Add `@CartesianTest.MethodParameterSource` (#796 / #797)

Allows specifying factory methods per-parameter
in `@CartesianTest`s, for easy composition.

closes: #796
PR: #797

PR checklist

The following checklist shall help the PR's author, the reviewers and maintainers to ensure the quality of this project.
It is based on our contributors guidelines, especially the "writing code" section.
It shall help to check for completion of the listed points.
If a point does not apply to the given PR's changes, the corresponding entry can be simply marked as done.

Documentation (general)

  • There is documentation (Javadoc and site documentation; added or updated)
  • There is implementation information to describe why a non-obvious source code / solution got implemented
  • Site documentation has its own .adoc file in the docs folder, e.g. docs/report-entries.adoc
  • Site documentation in .adoc file references demo in src/demo/java instead of containing code blocks as text
  • Only one sentence per line (especially in .adoc files)
  • Javadoc uses formal style, while sites documentation may use informal style

Documentation (new extension)

  • The docs/docs-nav.yml navigation has an entry for the new extension
  • The package-info.java contains information about the new extension

Code (general)

  • Code adheres to code style, naming conventions etc.
  • Successful tests cover all changes
  • There are checks which validate correct / false usage / configuration of a functionality and there are tests to verify those checks
  • Tests use AssertJ or our own PioneerAssert (which are based on AssertJ)

Code (new package)

  • The new package is exported in module-info.java
  • The new package is also present in the tests
  • The new package is opened for reflection to JUnit 5 in module-info.java
  • The new package is listed in the contribution guide

Contributing

  • A prepared commit message exists
  • The list of contributions inside README.adoc mentions the new contribution (real name optional)

@jpenilla jpenilla changed the title Add CartesianTest.MethodParameterSource Add @CartesianTest.MethodParameterSource Dec 20, 2023
@Michael1993
Copy link
Member

Let me know when you think this is ready for review by marking it as such (non-draft), please? 😄

I can give feedback in the meantime, of course, if you prefer.

gradle.properties Outdated Show resolved Hide resolved
@jpenilla jpenilla force-pushed the method-param-source branch 2 times, most recently from 687ef19 to 37790c6 Compare December 21, 2023 20:16
@jpenilla jpenilla marked this pull request as ready for review December 23, 2023 03:43
@Michael1993
Copy link
Member

I think the way you discover the method source is very similar to the @CartesianTest.MethodFactory. Could you take a look and extract the common logic to a utility class?

@Bukama
Copy link
Member

Bukama commented Mar 31, 2024

Also please rebase your branch to fix git conflicts while updating your PR - thank you :)

@Michael1993 Michael1993 self-requested a review May 10, 2024 14:53
@Bukama Bukama added this to the Pioneer 2.3.0 milestone May 10, 2024
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

Successfully merging this pull request may close these issues.

None yet

3 participants