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

Suport method automatic parameter conversions #3

Closed
joshka opened this issue Sep 2, 2018 · 2 comments
Closed

Suport method automatic parameter conversions #3

joshka opened this issue Sep 2, 2018 · 2 comments

Comments

@joshka
Copy link
Owner

joshka commented Sep 2, 2018

I'm of two minds on this on whether to shade the JsonP library.

Rather than having to manually pull keys and values out of a JsonObject parameter, It might be neat to support automatically filling parameters. E.g:

@ParameterizedTest
@JsonSource("{'itemA':'1','itemB':'2'}")
void test(int itemA, String itemB) {
  assertEquals(1, itemA);
  assertEquals("2", itemB);
}

This would require pulling the parameter names of the test method from the execution context, and a major version bump to 2.0.0 due to a non compatible change in the public interface.

@joshka joshka added the question Further information is requested label Nov 28, 2018
@joshka joshka changed the title Determine whether to shade the javax.json library Should this shade the javax.json library? Nov 28, 2018
@joshka
Copy link
Owner Author

joshka commented Dec 1, 2018

Decided not to shade the library for now, as I assume a test dependency is usually fairly simple to satisfy (where a production one might be less so). I will do the other part of this (enable automatically filling parameters, but currently have to resort to annotations for this to work.

@joshka joshka changed the title Should this shade the javax.json library? Suport method automatic parameter conversions Dec 1, 2018
joshka added a commit that referenced this issue Dec 1, 2018
Introduce JsonConverter that converts a single parameter by name from
Json to the parameter type (String, int, or boolean).
Only single parameters are supported right now.

#3
@joshka joshka removed the question Further information is requested label Dec 2, 2018
@joshka
Copy link
Owner Author

joshka commented Aug 20, 2024

See #177

@joshka joshka closed this as completed Aug 20, 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

No branches or pull requests

1 participant