Browse Source

add private fields

refactor test
pull/7243/head
Yuriy Lytvynchuk 4 years ago
parent
commit
5ee50e1e0e
  1. 8
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/transform/TbJsonPathNode.java
  2. 5
      rule-engine/rule-engine-components/src/test/java/org/thingsboard/rule/engine/transform/TbJsonPathNodeTest.java

8
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/transform/TbJsonPathNode.java

@ -49,10 +49,10 @@ import java.util.concurrent.ExecutionException;
)
public class TbJsonPathNode implements TbNode {
TbJsonPathNodeConfiguration config;
Configuration configurationJsonPath;
JsonPath jsonPath;
String jsonPathValue;
private TbJsonPathNodeConfiguration config;
private Configuration configurationJsonPath;
private JsonPath jsonPath;
private String jsonPathValue;
@Override
public void init(TbContext ctx, TbNodeConfiguration configuration) throws TbNodeException {

5
rule-engine/rule-engine-components/src/test/java/org/thingsboard/rule/engine/transform/TbJsonPathNodeTest.java

@ -71,11 +71,6 @@ public class TbJsonPathNodeTest {
node.destroy();
}
@Test
void givenDefaultConfig_whenInit_thenOK() {
assertThat(node.config).isEqualTo(config);
}
@Test
void givenDefaultConfig_whenInit_thenFail() {
config.setJsonPath("");

Loading…
Cancel
Save