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

fix(#2406): added test for FakeMaven #2658

Merged

Conversation

Yanich96
Copy link
Contributor

@Yanich96 Yanich96 commented Nov 30, 2023

Ref: #2406

What's done:

  1. I have found the bug: in FakeMaven parameters were not configured for AssembleMojo.
  2. I have added test, that checks this bug.
  3. I have added todo for fixing this bug.

PR-Codex overview

This PR focuses on fixing the configuration of custom parameters in the FakeMaven class.

Detailed summary

  • Fixed the FakeMaven#allowedParams(Class) function to configure parameters of executed Mojo and parameters of Mojos inside the executed Mojo.
  • Added a test case to ensure that custom parameters can be configured within the AssembleMojo.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@maxonfjvipon
Copy link
Member

maxonfjvipon commented Nov 30, 2023

@Yanich96 please add to the description of pull request:

  • reference to main issue
  • explanation what kind of bug is found and what your tests actually tests
  • reason for removing trackOptimizationSteps from AssembleMojo

Also it would be nice to change the header of the PR

Copy link
Member

@maxonfjvipon maxonfjvipon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yanich96 good one, just a few comments from my side

.execute(AssembleMojo.class)
.result();
MatcherAssert.assertThat(
res,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yanich96 let's add assertion message here and below

Copy link
Contributor Author

@Yanich96 Yanich96 Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxonfjvipon I have done

@@ -70,6 +70,13 @@
* their behaviour and results.
* NOT thread-safe.
* @since 0.28.12
* @todo #2406:30min Fix {@link FakeMaven#allowedParams(Class)}
* This function parameters of executed Mojo in {@link FakeMaven#execute(Class)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yanich96 I think English needs to be corrected here. Please use translator or chatGPT

Copy link
Contributor Author

@Yanich96 Yanich96 Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxonfjvipon I have changed

@Yanich96 Yanich96 changed the title fix(#2406): added todo + test fix(#2406): added test for FakeMaven Dec 1, 2023
Copy link
Member

@maxonfjvipon maxonfjvipon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yanich96 LGTM! Thanks

@Yanich96
Copy link
Contributor Author

Yanich96 commented Dec 1, 2023

@yegor256 please approve

1 similar comment
@Yanich96
Copy link
Contributor Author

Yanich96 commented Dec 4, 2023

@yegor256 please approve

@yegor256
Copy link
Member

yegor256 commented Dec 4, 2023

@rultor merge

@rultor
Copy link
Contributor

rultor commented Dec 4, 2023

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit cde58ba into objectionary:master Dec 4, 2023
12 checks passed
@rultor
Copy link
Contributor

rultor commented Dec 4, 2023

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 19min)

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.

4 participants