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

Ref enhancements #8

Open
big-andy-coates opened this issue Apr 7, 2022 · 0 comments
Open

Ref enhancements #8

big-andy-coates opened this issue Apr 7, 2022 · 0 comments

Comments

@big-andy-coates
Copy link
Member

TestSuiteDef contains a list of References to inputs and expectations. The default SimpleRef type is just the relative path to the input or expectation file within the test package, (with optional file extension).

However, the idea is that is Ref model extendable. I'm thinking two types of Ref extensions:

  1. TemplateRef is a subtype of Ref that can be used to pre-process the file before its converted into its final Java type. The idea here is that the input/expectation file is a template and additional information in the suite can override some of the data in the file. For example, could have an implementation that allowed values within a YAML input or expectation file to be overridden by JSONPath. Another implementation could replace tokens within the file, or even leverage velocity templates or similar. (More thought needed).
  2. InjectableRef is a subtype that can be passed to the @JsonCreator of the Java type an input or expectation is deserialised as. Injection could be achieved via @JacksonInject annotated params in the creator method. This would allow the information in the InjectableRef to be augment the data within the input/expectation file during deserialisation.
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