TNG / junit-dataprovider

A TestNG like dataprovider runner for JUnit with many additional features
Apache License 2.0
246 stars 164 forks source link

Support of wildcards in DataConverter.canConvert #86

Closed nikowitt closed 7 years ago

nikowitt commented 7 years ago

Hi there,

is there any specific reason why DataConverter.canConvert, line 31 is implemented as

return Object.class.equals(innerType);

instead of

return Object.class.equals(innerType) || innerType instanceof WildcardTypeImpl;

? This way, lots of type conversions in a dataprovider can be avoided.

Best regards, Niko

aaschmid commented 7 years ago

Hi @nikowitt,

glad to hear from you and you are still using our junit-dataprovider :-)

No, there is no reason for that besides that I did not think about that case at all. Thanks for that. Am I rude to ask for PR? :-P

Cheers, Andreas

nikowitt commented 7 years ago

Interesting, it seems that with 1.12.0 it already works - with 1.11.0 I had to implement this.

aaschmid commented 7 years ago

Hm ... I refactored the logic. But good if it works already :-) At least it is worth to write a unit test for your case, though.

aaschmid commented 7 years ago

Added an addtional test case even if there have already been a lot ... No release required as it is working with v.1.12.0 already. Fixed with "relax List dataprovider outer and inner types (#78)"

Thanks anyway for the feedback :-)