File tree Expand file tree Collapse file tree 2 files changed +3
-23
lines changed
dsf-bpe/dsf-bpe-test-plugin-v2/src/main/java/dev/dsf/bpe/test Expand file tree Collapse file tree 2 files changed +3
-23
lines changed Original file line number Diff line number Diff line change 1
1
package dev .dsf .bpe .test .json ;
2
2
3
3
import com .fasterxml .jackson .annotation .JsonCreator ;
4
- import com .fasterxml .jackson .annotation .JsonGetter ;
5
4
import com .fasterxml .jackson .annotation .JsonProperty ;
6
5
7
- public class JsonPojo
6
+ public record JsonPojo ( @ JsonProperty ( "value-1" ) String value1 , @ JsonProperty ( "value-2" ) String value2 )
8
7
{
9
- @ JsonProperty ("value-1" )
10
- private final String value1 ;
11
-
12
- @ JsonProperty ("value-2" )
13
- private final String value2 ;
14
-
15
8
@ JsonCreator
16
9
public JsonPojo (@ JsonProperty ("value-1" ) String value1 , @ JsonProperty ("value-2" ) String value2 )
17
10
{
18
11
this .value1 = value1 ;
19
12
this .value2 = value2 ;
20
13
}
21
-
22
- @ JsonGetter
23
- public String getValue1 ()
24
- {
25
- return value1 ;
26
- }
27
-
28
- @ JsonGetter
29
- public String getValue2 ()
30
- {
31
- return value2 ;
32
- }
33
-
34
14
}
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ public void getJsonVariable(Variables variables) throws Exception
25
25
JsonPojo variable = variables .getVariable (JsonVariableTestSet .JSON_VARIABLE );
26
26
27
27
expectNotNull (variable );
28
- expectSame (JsonVariableTestSet .TEST_VALUE_1 , variable .getValue1 ());
29
- expectSame (JsonVariableTestSet .TEST_VALUE_2 , variable .getValue2 ());
28
+ expectSame (JsonVariableTestSet .TEST_VALUE_1 , variable .value1 ());
29
+ expectSame (JsonVariableTestSet .TEST_VALUE_2 , variable .value2 ());
30
30
}
31
31
32
32
@ PluginTest
You can’t perform that action at this time.
0 commit comments