changed exception text for mapping based rule nodes
This commit is contained in:
parent
7d3354a8c6
commit
d49c83b264
@ -50,7 +50,7 @@ public abstract class TbAbstractGetEntityAttrNode<T extends EntityId> extends Tb
|
||||
|
||||
protected void checkIfMappingIsNotEmptyOrElseThrow(Map<String, String> attrMapping) throws TbNodeException {
|
||||
if (attrMapping == null || attrMapping.isEmpty()) {
|
||||
throw new TbNodeException("At least one attribute mapping should be specified!");
|
||||
throw new TbNodeException("At least one mapping entry should be specified!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ public class TbGetOriginatorFieldsNode extends TbAbstractNodeWithFetchTo<TbGetOr
|
||||
protected TbGetOriginatorFieldsConfiguration loadNodeConfiguration(TbNodeConfiguration configuration) throws TbNodeException {
|
||||
var config = TbNodeUtils.convert(configuration, TbGetOriginatorFieldsConfiguration.class);
|
||||
if (config.getFieldsMapping() == null || config.getFieldsMapping().isEmpty()) {
|
||||
throw new TbNodeException("At least one field mapping should be specified!");
|
||||
throw new TbNodeException("At least one mapping entry should be specified!");
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ public class TbGetCustomerAttributeNodeTest {
|
||||
@Test
|
||||
public void givenEmptyAttributesMapping_whenInit_thenException() {
|
||||
// GIVEN
|
||||
var expectedExceptionMessage = "At least one attribute mapping should be specified!";
|
||||
var expectedExceptionMessage = "At least one mapping entry should be specified!";
|
||||
|
||||
config.setAttrMapping(Collections.emptyMap());
|
||||
nodeConfiguration = new TbNodeConfiguration(JacksonUtil.valueToTree(config));
|
||||
|
||||
@ -303,7 +303,7 @@ public class TbGetOriginatorFieldsNodeTest {
|
||||
var exception = assertThrows(TbNodeException.class, () -> node.init(ctxMock, nodeConfiguration));
|
||||
|
||||
// THEN
|
||||
assertThat(exception.getMessage()).isEqualTo("At least one field mapping should be specified!");
|
||||
assertThat(exception.getMessage()).isEqualTo("At least one mapping entry should be specified!");
|
||||
verify(ctxMock, never()).tellSuccess(any());
|
||||
}
|
||||
|
||||
|
||||
@ -197,7 +197,7 @@ public class TbGetRelatedAttributeNodeTest {
|
||||
@Test
|
||||
public void givenEmptyAttributesMapping_whenInit_thenException() {
|
||||
// GIVEN
|
||||
var expectedExceptionMessage = "At least one attribute mapping should be specified!";
|
||||
var expectedExceptionMessage = "At least one mapping entry should be specified!";
|
||||
|
||||
config.setAttrMapping(Collections.emptyMap());
|
||||
nodeConfiguration = new TbNodeConfiguration(JacksonUtil.valueToTree(config));
|
||||
|
||||
@ -156,7 +156,7 @@ public class TbGetTenantAttributeNodeTest {
|
||||
@Test
|
||||
public void givenEmptyAttributesMapping_whenInit_thenException() {
|
||||
// GIVEN
|
||||
var expectedExceptionMessage = "At least one attribute mapping should be specified!";
|
||||
var expectedExceptionMessage = "At least one mapping entry should be specified!";
|
||||
|
||||
config.setAttrMapping(Collections.emptyMap());
|
||||
nodeConfiguration = new TbNodeConfiguration(JacksonUtil.valueToTree(config));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user