Skip to content

TG-23049 - added new attributes to @InTestsMock #30

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
merged 1 commit into from
May 15, 2025

Conversation

jamescatto
Copy link
Contributor

This adds the method attributes to InTestsMock to allow users to specify return values for mocked methods

@jamescatto jamescatto force-pushed the jcatto/TG-23049-mock branch from 41cf132 to 2b39238 Compare May 12, 2025 17:29
@jamescatto jamescatto requested a review from a team May 13, 2025 08:49
short[] shortReturnValues() default {};

/** @return String value or values to return from the {@link #method()} */
String[] stringReturnValues() default {};
Copy link
Contributor

Choose a reason for hiding this comment

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

since we cannot use: String[][] can we do:
String[] stringArrayReturnValue - to return only one array. does it make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This would support 1-D arrays. We would have to add similar attributes for each of the primitive types as well. @peterschrammel should we do this?

Copy link

@gabriel-wr gabriel-wr left a comment

Choose a reason for hiding this comment

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

Approved - used this new version when QAing

@jamescatto jamescatto merged commit 8632424 into develop May 15, 2025
1 check passed
@jamescatto jamescatto deleted the jcatto/TG-23049-mock branch May 15, 2025 16:34
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