Class DummyApp
java.lang.Object
test.de.iip_ecosphere.platform.configuration.maven.DummyApp
A testing application for
ProcessUnitTest.- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T> Turns givenelementstolist.static StringEmulates reading a Spring-like parameter if the configuration is not yet in place.static intReturns an int command line argument.static voidSimple test program.static voidsleep(int ms) Just sleeps for the given amount of milliseconds.static String[]Turns a command line string into arguments.static <T> List<T> toList(T... elements) Turns givenelementsinto a list.
-
Field Details
-
PROPERTY_ARGS
- See Also:
-
PARAM_PREFIX
- See Also:
-
PARAM_VALUE_SEP
- See Also:
-
-
Constructor Details
-
DummyApp
public DummyApp()
-
-
Method Details
-
getArg
Emulates reading a Spring-like parameter if the configuration is not yet in place.- Parameters:
args- the argumentsargName- the argument name (withoutPARAM_PREFIXorPARAM_VALUE_SEP)dflt- the default value if the argument cannot be found- Returns:
- the value of argument or
dflt
-
getIntArg
Returns an int command line argument.- Parameters:
args- the argumentsargName- the argument name (withoutPARAM_PREFIXorPARAM_VALUE_SEP)dflt- the default value if the argument cannot be found- Returns:
- the value of argument or
dflt
-
sleep
public static void sleep(int ms) Just sleeps for the given amount of milliseconds.- Parameters:
ms- the milliseconds to wait for
-
toList
Turns givenelementsinto a list.- Type Parameters:
T- the element type- Parameters:
elements- the elements- Returns:
- the list containing all
elements
-
toArgs
Turns a command line string into arguments. Considers usual quotes.- Parameters:
args- the arguments as string- Returns:
- the parsed arguments
-
addAll
Turns givenelementstolist.- Type Parameters:
T- the element type- Parameters:
list- the list to be modified as a side effectelements- the elements- Returns:
- the list with all
elementsadded
-
main
Simple test program.- Parameters:
args- command line arguments;--start=intindicates the first value to start counting at (default1);--max=intindicates the maximum value to stop looping at (default10);--modulo=intindicates the group size for the second output on the error stream (default5)
-