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 { public class TbJsonPathNode implements TbNode {
TbJsonPathNodeConfiguration config; private TbJsonPathNodeConfiguration config;
Configuration configurationJsonPath; private Configuration configurationJsonPath;
JsonPath jsonPath; private JsonPath jsonPath;
String jsonPathValue; private String jsonPathValue;
@Override @Override
public void init(TbContext ctx, TbNodeConfiguration configuration) throws TbNodeException { 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(); node.destroy();
} }
@Test
void givenDefaultConfig_whenInit_thenOK() {
assertThat(node.config).isEqualTo(config);
}
@Test @Test
void givenDefaultConfig_whenInit_thenFail() { void givenDefaultConfig_whenInit_thenFail() {
config.setJsonPath(""); config.setJsonPath("");

Loading…
Cancel
Save