Skip to content

Add Kotlin Sequence support for @TestFactory, @MethodSource, and @FieldSource #3377

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

Conversation

hanszt
Copy link
Contributor

@hanszt hanszt commented Jul 2, 2023

Overview

Add support for converting Iterator-providing classes to a Stream in org.junit.platform.commons.util.CollectionUtils.


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

@hanszt hanszt force-pushed the feature/testfactory-kotlin-sequence-support branch 10 times, most recently from 8a0a767 to 52d6c31 Compare July 5, 2023 08:15
@hanszt hanszt changed the title Feature/TestFactory kotlin sequence support Feature/TestFactory Kotlin Sequence support Jul 5, 2023
@marcphilipp marcphilipp linked an issue Jul 7, 2023 that may be closed by this pull request
2 tasks
@hanszt hanszt force-pushed the feature/testfactory-kotlin-sequence-support branch from 52d6c31 to f32d798 Compare July 7, 2023 20:38
@hanszt hanszt requested a review from marcphilipp July 7, 2023 20:54
@hanszt
Copy link
Contributor Author

hanszt commented Jul 25, 2023

Hello, I am curious if my changes in response to the review satisfy the requirements. I would love to hear what you think and if it can be merged to the main branch

@hanszt hanszt force-pushed the feature/testfactory-kotlin-sequence-support branch from f32d798 to 9e7a9a3 Compare May 8, 2024 09:05
Copy link
Member

@marcphilipp marcphilipp left a comment

Choose a reason for hiding this comment

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

@hanszt Sorry for the delay! I think this would be a very useful change.

@hanszt
Copy link
Contributor Author

hanszt commented May 17, 2024

No worries. I can imagine you are busy. I'm glad you think it is a good improvement.

@hanszt hanszt force-pushed the feature/testfactory-kotlin-sequence-support branch from 9e7a9a3 to 4ce948f Compare May 27, 2024 16:36
@hanszt hanszt requested a review from marcphilipp May 27, 2024 16:50
@sbrannen sbrannen changed the title Feature/TestFactory Kotlin Sequence support Add Kotlin Sequence support for @TestFactory methods Jun 2, 2024
@hanszt hanszt force-pushed the feature/testfactory-kotlin-sequence-support branch from 4ce948f to 8a9d199 Compare September 27, 2024 09:14
@marcphilipp
Copy link
Member

@hanszt Just a quick update. I intend to include your work in a focused effort to improve Kotlin support as part of #4014 early next year. I probably won't get to it before then.

@hanszt
Copy link
Contributor Author

hanszt commented Oct 18, 2024

@marcphilipp Thanks for the update. Congratz on the investment of Sovereign Tech Fund in Junit5 by the way! 🎉

Examples of benefits:

- Kotlin Sequence support for @testfactory
- Kotlin Sequence support for @MethodSource
- Classes that expose an Iterator returning method,
can be converted to a stream.

Issue: junit-team#3376

I hereby agree to the terms of the JUnit Contributor License Agreement.
@hanszt hanszt force-pushed the feature/testfactory-kotlin-sequence-support branch from 8a9d199 to 46fe660 Compare February 15, 2025 17:43
@marcphilipp marcphilipp changed the title Add Kotlin Sequence support for @TestFactory methods Add Kotlin Sequence support for @TestFactory, @MethodSource, and @FieldSource May 6, 2025
@marcphilipp
Copy link
Member

@hanszt I pushed a few commits of my own. Do you have time to take a look?

@marcphilipp marcphilipp merged commit 4083551 into junit-team:main May 8, 2025
13 checks passed
@marcphilipp
Copy link
Member

I went ahead with the merge. Feedback is still welcome, though!

@hanszt
Copy link
Contributor Author

hanszt commented May 10, 2025

Hi @marcphilipp ,

Nice that the pull request is merged!

Your commits and polishing of the implementation looks good!

I would really appreciate it if I could be added to the junit5 contributors list.

And maybe also add the Github achievement batch that a pull request has been merged? Or is that something that Github decides?

Thanks in advance!

Looking forward to using it in my projects and our Kotlin codebase at Drillster!

@marcphilipp
Copy link
Member

Sure thing! We list all first-time contributors as part of the release description on GitHub. So, just a little longer! 🙂

Thanks again for your contribution! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Kotlin Sequence support for @TestFactory, @MethodSource, and @FieldSource
3 participants