cucumber-jvm
cucumber-jvm copied to clipboard
Messages should interact more gracefully with Java
🤔 What's the problem you're trying to solve?
While converting the plugins to use messages I'm running into some annoyances using the messages API.
✨ What's your proposed solution?
- Timestamp should use
Timestamp(Long seconds, Integer nanos)to matchInstants.getEpochSecondandgetNano. - Location should use
Location(Integer line, Integer column). There are no instances were a string in Java can be addressed with a long. - Same for
Group(List<Group> children, Integer start, String value)
Implementing Comparators for Location and Timestamp could also help avoid some annoyances. (e.g. https://github.com/cucumber/query/blob/main/java/src/main/java/io/cucumber/query/TimestampComparator.java).
⛏ Have you considered any alternatives or workarounds?
No response
📚 Any additional context?
No response