java-faker icon indicating copy to clipboard operation
java-faker copied to clipboard

Add support of methods with varargs and #{options.option ...}

Open snuyanzin opened this issue 3 years ago • 2 comments

There 2 issues:

  1. Current code can not resolve the code with varargs e.g. Options.option
  2. Options does not have option method with String varargs which is implied by FakeValuesService

This PR adds check if there is varargs in method args and supports it, also adds Options.option with String varargs to make it working like

#{options.option '12','345','89','54321'}

snuyanzin avatar Feb 04 '22 09:02 snuyanzin

Hi @snuyanzin , would it be possible to send this PR to Datafaker.net too? I've merged and released your previous PR as part of datafaker 1.1.0 a few days ago (see https://www.datafaker.net/releases/1.1.0/) , and happy to do for this change too!

bodiam avatar Feb 04 '22 09:02 bodiam

yes, sure, i will try to do it a bit later today

snuyanzin avatar Feb 04 '22 09:02 snuyanzin