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

Use parameterized test for CamelCatalogVersionTest #795

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

apupier
Copy link
Member

@apupier apupier commented Jul 19, 2022

No description provided.

Copy link
Contributor

@joshiraez joshiraez left a comment

Choose a reason for hiding this comment

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

Similar thing to what I said #792 although I don't think we need to go on a full TDD way in this file, it would still be useful that the data structure holding the information has all the information of the unit test and can be read at a glance

This way, we are losing a lot of valuable information in my opinion, just to avoid a bit of code duplication which I feel is not bad as they are different use cases at heart

void testCompletionWithCatalog3xVersionLoaded() throws Exception {
camelCatalogVersion = "3.0.0-RC3";
@ParameterizedTest
@ValueSource(strings = {"2.23.4", "3.0.0-RC3", "2.23.2.fuse-7_11_0-00037-redhat-00001"})
Copy link
Contributor

Choose a reason for hiding this comment

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

Without labels to understand what each string tests I really feel like we lose a ton of valuable information and, in case the test fails, it won't help us understand at all that each one is a different use case.

Copy link
Member Author

Choose a reason for hiding this comment

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

Each parameter is seen as a different test in the result.
image

Copy link
Member Author

Choose a reason for hiding this comment

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

with the screenshot of the corresponding tests:
image

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.

2 participants