@Test void testDetermineCurrentUserWithSetUser() { VariableHandling.set(execution, Variables.USER, EXAMPLE_USER); String determinedUser = StepsUtil.determineCurrentUser(execution); assertEquals(EXAMPLE_USER, determinedUser); }
public static String determineCurrentUser(VariableScope scope) { String user = VariableHandling.get(scope, Variables.USER); if (user == null) { throw new SLException(Messages.CANT_DETERMINE_CURRENT_USER); } return user; }
StepsUtil { public static String determineCurrentUser(VariableScope scope) { String user = VariableHandling.get(scope, Variables.USER); if (user == null) { throw new SLException(Messages.CANT_DETERMINE_CURRENT_USER); } return user; } }
StepsUtil { public static String determineCurrentUser(VariableScope scope) { String user = VariableHandling.get(scope, Variables.USER); if (user == null) { throw new SLException(Messages.CANT_DETERMINE_CURRENT_USER); } return user; } protected  StepsUtil(); }
StepsUtil { public static String determineCurrentUser(VariableScope scope) { String user = VariableHandling.get(scope, Variables.USER); if (user == null) { throw new SLException(Messages.CANT_DETERMINE_CURRENT_USER); } return user; } protected  StepsUtil(); static String determineCurrentUser(VariableScope scope); static CloudHandlerFactory getHandlerFactory(VariableScope scope); static String getQualifiedMtaId(String mtaId, String namespace); static CloudServiceBroker getServiceBrokersToCreateForModule(VariableScope scope, String moduleName); static List<String> getCreatedOrUpdatedServiceBrokerNames(ProcessContext context); static String getLoggerPrefix(Logger logger); static void incrementVariable(VariableScope scope, String name); static void setExecutedHooksForModule(VariableScope scope, String moduleName, Map<String, List<String>> moduleHooks); static Map<String, List<String>> getExecutedHooksForModule(VariableScope scope, String moduleName); static Integer getInteger(VariableScope scope, String name); static Integer getInteger(VariableScope scope, String name, Integer defaultValue); static T getObject(VariableScope scope, String name); @SuppressWarnings("unchecked") static T getObject(VariableScope scope, String name, T defaultValue); static T getFromJsonBinary(VariableScope scope, String name, Class<T> classOfT); static T getFromJsonBinary(VariableScope scope, String name, TypeReference<T> type); static T getFromJsonBinary(VariableScope scope, String name, TypeReference<T> type, T defaultValue); static void setAsJsonBinary(VariableScope scope, String name, Object value); }
StepsUtil { public static String determineCurrentUser(VariableScope scope) { String user = VariableHandling.get(scope, Variables.USER); if (user == null) { throw new SLException(Messages.CANT_DETERMINE_CURRENT_USER); } return user; } protected  StepsUtil(); static String determineCurrentUser(VariableScope scope); static CloudHandlerFactory getHandlerFactory(VariableScope scope); static String getQualifiedMtaId(String mtaId, String namespace); static CloudServiceBroker getServiceBrokersToCreateForModule(VariableScope scope, String moduleName); static List<String> getCreatedOrUpdatedServiceBrokerNames(ProcessContext context); static String getLoggerPrefix(Logger logger); static void incrementVariable(VariableScope scope, String name); static void setExecutedHooksForModule(VariableScope scope, String moduleName, Map<String, List<String>> moduleHooks); static Map<String, List<String>> getExecutedHooksForModule(VariableScope scope, String moduleName); static Integer getInteger(VariableScope scope, String name); static Integer getInteger(VariableScope scope, String name, Integer defaultValue); static T getObject(VariableScope scope, String name); @SuppressWarnings("unchecked") static T getObject(VariableScope scope, String name, T defaultValue); static T getFromJsonBinary(VariableScope scope, String name, Class<T> classOfT); static T getFromJsonBinary(VariableScope scope, String name, TypeReference<T> type); static T getFromJsonBinary(VariableScope scope, String name, TypeReference<T> type, T defaultValue); static void setAsJsonBinary(VariableScope scope, String name, Object value); static final String DEPLOY_ID_PREFIX; }