refactored SMSCShellExecutor:removed duplicates for CLI get command;
added new option to CLI get command;
added tests for CLI get command;
added new flag 'markTimeoutAsPermanentFailure' to SmscPropertiesManagement;
added functionality for new flag;
Fixes #289
reduced code in ShellExecutor;
added discovery of new getters via reflection:
no need to add manual call of getter method, getter will be discovered automatically
private void initSmscPropertiesManagementGetters() {
smscPropertiesManagementGetters = new HashMap<>();
Class c = smscPropertiesManagement.getClass();
for (Method method : c.getMethods()) {
String methodName = method.getName();
if (methodName.startsWith("get")) {
smscPropertiesManagementGetters.put(methodName.substring(3).toLowerCase(), method);
} else if (methodName.startsWith("is")) {
smscPropertiesManagementGetters.put(methodName.substring(2).toLowerCase(), method);
}
}
}
then just call function
addProperty(sb, "${getterNameWithout_get|is}");
refactored SMSCShellExecutor:removed duplicates for CLI get command; added new option to CLI get command; added tests for CLI get command; added new flag 'markTimeoutAsPermanentFailure' to SmscPropertiesManagement; added functionality for new flag; Fixes #289
reduced code in ShellExecutor; added discovery of new getters via reflection: no need to add manual call of getter method, getter will be discovered automatically
then just call function
addProperty(sb, "${getterNameWithout_get|is}");