Merge branch 'dev' into fix_command_build
This commit is contained in:
commit
000c249401
|
|
@ -66,7 +66,7 @@ public class SwitchTaskUtils {
|
|||
Map<String, Property> varParams) {
|
||||
String content = condition.replaceAll("'", "\"");
|
||||
if (MapUtils.isEmpty(globalParams) && MapUtils.isEmpty(varParams)) {
|
||||
throw new IllegalArgumentException("globalParams and varParams are both empty, please check it.");
|
||||
return content;
|
||||
}
|
||||
Map<String, Property> params = Maps.newHashMap();
|
||||
if (MapUtils.isNotEmpty(globalParams)) {
|
||||
|
|
|
|||
|
|
@ -34,9 +34,8 @@ public class SwitchTaskUtilsTest {
|
|||
String content = "${test}==1";
|
||||
Map<String, Property> globalParams = new HashMap<>();
|
||||
Map<String, Property> varParams = new HashMap<>();
|
||||
Assertions.assertThrowsExactly(IllegalArgumentException.class, () -> {
|
||||
SwitchTaskUtils.generateContentWithTaskParams(content, globalParams, varParams);
|
||||
});
|
||||
Assertions.assertDoesNotThrow(
|
||||
() -> SwitchTaskUtils.generateContentWithTaskParams(content, globalParams, varParams));
|
||||
|
||||
globalParams.put("test", new Property("test", Direct.IN, DataType.INTEGER, "1"));
|
||||
String result = SwitchTaskUtils.generateContentWithTaskParams(content, globalParams, varParams);
|
||||
|
|
|
|||
Loading…
Reference in New Issue