public abstract class TestUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TestUtils.TestApplicationContext
A
GenericApplicationContext extension with some support methods
to register Spring Integration beans in the application context at runtime. |
| Constructor and Description |
|---|
TestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
applySystemFileSeparator(java.lang.String s)
Update file path by replacing any '/' with the system's file separator.
|
static org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler |
createTaskScheduler(int poolSize)
A factory for the
ThreadPoolTaskScheduler instances based on the provided poolSize. |
static TestUtils.TestApplicationContext |
createTestApplicationContext()
Create a
TestUtils.TestApplicationContext instance
supplied with the basic Spring Integration infrastructure. |
static java.lang.Object |
getPropertyValue(java.lang.Object root,
java.lang.String propertyPath)
Obtain a value for the property from the provide object.
|
static <T> T |
getPropertyValue(java.lang.Object root,
java.lang.String propertyPath,
java.lang.Class<T> type)
Obtain a value for the property from the provide object
and try to cast it to the provided type.
|
static java.util.Properties |
locateComponentInHistory(java.util.List<java.util.Properties> history,
java.lang.String componentName,
int startingIndex) |
public static java.lang.Object getPropertyValue(java.lang.Object root,
java.lang.String propertyPath)
root - the object to obtain the property valuepropertyPath - the property name to obtain a value.
Can be nested path defined by the period.DirectFieldAccessorpublic static <T> T getPropertyValue(java.lang.Object root,
java.lang.String propertyPath,
java.lang.Class<T> type)
T - the expected value type.
Can be nested path defined by the period.root - the object to obtain the property valuepropertyPath - the property name to obtain a value.type - the expected value type.DirectFieldAccessorpublic static TestUtils.TestApplicationContext createTestApplicationContext()
TestUtils.TestApplicationContext instance
supplied with the basic Spring Integration infrastructure.TestUtils.TestApplicationContext instancepublic static org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler createTaskScheduler(int poolSize)
ThreadPoolTaskScheduler instances based on the provided poolSize.poolSize - the size for the ThreadPoolTaskSchedulerThreadPoolTaskScheduler instance.public static java.util.Properties locateComponentInHistory(java.util.List<java.util.Properties> history,
java.lang.String componentName,
int startingIndex)
history - a message historycomponentName - the name of a component to scan forstartingIndex - the index to start scanningpublic static java.lang.String applySystemFileSeparator(java.lang.String s)
s - The file path containing '/'.