You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In issue #1884 asked if it would be possible to allow redefinition of the default DataTableType of String -> String, so that replaceWithEmptyString could be defined.
Would it be possible to also allow redefinition of the default ParameterType and DocString types for String? I have a use case that is outside the bounds of what Cucumber is "supposed" to do, and to make it work I've had to do some highly questionable things with the Reflection API to unregister the default converters so I can define my own.
For reference, the odd use case is that my boss wanted to be able to pre-parse the inputs, so that if the parameter contains a specific pattern it can be converted to a value from a properties file. The correct approach would have been to define a new object like "ConvertedString", and used that in the step definitions, but my boss rejected that as too complex.
The text was updated successfully, but these errors were encountered:
john-caleb-phillips
changed the title
Unable to configure a DataTableType for a List<List<String>> type #1884
Redefine default processing for ParameterType and DocStringType
Mar 3, 2020
Yes, this was suggested as well, but also rejected. The boss wants the conversion to be invisible to the people who are writing the steps and features in our projects.
Unfortunately I don't see a good reason to support this. Cucumber is a tool to support BDD and assumes that all people involved are communicating and collaborating. It would be rather weird to hide behavior like this.
In issue #1884 asked if it would be possible to allow redefinition of the default DataTableType of String -> String, so that replaceWithEmptyString could be defined.
Would it be possible to also allow redefinition of the default ParameterType and DocString types for String? I have a use case that is outside the bounds of what Cucumber is "supposed" to do, and to make it work I've had to do some highly questionable things with the Reflection API to unregister the default converters so I can define my own.
For reference, the odd use case is that my boss wanted to be able to pre-parse the inputs, so that if the parameter contains a specific pattern it can be converted to a value from a properties file. The correct approach would have been to define a new object like "ConvertedString", and used that in the step definitions, but my boss rejected that as too complex.
The text was updated successfully, but these errors were encountered: