validateTaskConfiguration(config);
}
public void testEnvVarReplaceConfigProperties() {
WorkflowTaskConfiguration config = null;
try {
config = workflowRepository
.getConfigurationByTaskId("urn:oodt:PropReplaceTask");
} catch (RepositoryException e) {
e.printStackTrace();
fail(e.getMessage());
}
assertNotNull(config);
String replacedPath = config.getProperty("PathToReplace");
String expectedValue = System.getenv("HOME") + "/my/path";
assertEquals("The path: [" + replacedPath
+ "] does not equal the expected" + "path: [" + expectedValue
+ "]", replacedPath, expectedValue);
String notReplacedPath = config.getProperty("DontReplaceMe");
String notReplacedPathNoSpec = config
.getProperty("DontReplaceMeNoSpec");
assertNotNull(notReplacedPath);
assertNotNull(notReplacedPathNoSpec);
assertEquals(notReplacedPath, notReplacedPathNoSpec);