junit5: TbGetTelemetryNodeTest annotation exceptions refactoring
This commit is contained in:
parent
888f026fd6
commit
7327adf239
@ -18,6 +18,7 @@ package org.thingsboard.rule.engine.metadata;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.thingsboard.common.util.JacksonUtil;
|
import org.thingsboard.common.util.JacksonUtil;
|
||||||
import org.thingsboard.rule.engine.api.TbContext;
|
import org.thingsboard.rule.engine.api.TbContext;
|
||||||
import org.thingsboard.rule.engine.api.TbNodeConfiguration;
|
import org.thingsboard.rule.engine.api.TbNodeConfiguration;
|
||||||
@ -70,14 +71,18 @@ public class TbGetTelemetryNodeTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test
|
||||||
public void givenAggregationWhiteSpace_whenParseAggregation_thenException() {
|
public void givenAggregationWhiteSpace_whenParseAggregation_thenException() {
|
||||||
|
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||||
node.parseAggregationConfig(" ");
|
node.parseAggregationConfig(" ");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test
|
||||||
public void givenAggregationIncorrect_whenParseAggregation_thenException() {
|
public void givenAggregationIncorrect_whenParseAggregation_thenException() {
|
||||||
|
Assertions.assertThrows(IllegalArgumentException.class, () -> {
|
||||||
node.parseAggregationConfig("TOP");
|
node.parseAggregationConfig("TOP");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user