Skip to content

Commit

Permalink
Add support for enum values in properties methods in bridge service
Browse files Browse the repository at this point in the history
  • Loading branch information
rabelenda-abstracta committed Aug 24, 2023
1 parent 3f9d4be commit 70d010a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ private Object constructParameter(Node node, Parameter parameter) {
Function<String, Object> parser = PARSERS.get(paramType);
if (parser != null && node instanceof ScalarNode) {
return parser.apply(((ScalarNode) node).getValue());
} else if (paramType.isEnum() && node instanceof ScalarNode) {
return Enum.valueOf((Class) paramType, ((ScalarNode) node).getValue());
} else {
Object ret = constructor.constructObject(node);
if (paramType.isAssignableFrom(ret.getClass())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public DslRegexExtractor matchNumber(int matchNumber) {
* And you use {@code user=([^&]+)} as regular expression. Then {@code $1$-$2$} will result in
* storing in the specified JMeter variable the value {@code tester-abstracta}.
* <p>
* When not specified {@code $1$ will be used}.
* When not specified {@code $1$} will be used.
*
* @param template specifies template to use for storing in the JMeter variable.
* @return the extractor for further configuration or usage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Abstracts logic for {@link DslTestElement} that can nest other test elements.
*
* @param <T> is type of test elements that can be nested by this class.
* @param <C> is type of test elements that can be nested by this class.
* <p>
* Check {@link DslTestPlan} for an example.
* @since 0.1
Expand Down

0 comments on commit 70d010a

Please sign in to comment.