Methods Summary |
---|
protected java.io.File | createRelativeFile(java.lang.String filename)
if (filename.equals(".")) {
return getProjectDir();
}
// else
return new File(getProjectDir(), filename);
|
public void | off_testFailOnError()
try {
expectLogContaining("testFailOnError",
"Unable to process image stream");
}
catch (RuntimeException re){
assertTrue("Run time exception should say "
+ "'Unable to process image stream'. :"
+ re.toString(),
re.toString()
.indexOf("Unable to process image stream") > -1);
}
|
public void | setUp()
configureProject(TASKDEFS_DIR + "image.xml");
|
public void | tearDown()
executeTarget("cleanup");
|
public void | testEchoToLog()
expectLogContaining("testEchoToLog", "Processing File");
|
public void | testOverwriteFalse()
expectLogContaining("testSimpleScale", "Processing File");
File f = createRelativeFile("/dest/" + LARGEIMAGE);
long lastModified = f.lastModified();
expectLogContaining("testOverwriteFalse", "Processing File");
f = createRelativeFile("/dest/" + LARGEIMAGE);
long overwrittenLastModified = f.lastModified();
assertTrue("File was overwritten.",
lastModified == overwrittenLastModified);
|
public void | testOverwriteTrue()
expectLogContaining("testSimpleScale", "Processing File");
File f = createRelativeFile("/dest/" + LARGEIMAGE);
long lastModified = f.lastModified();
try {
Thread.sleep(FILE_UTILS
.getFileTimestampGranularity());
}
catch (InterruptedException e) {}
expectLogContaining("testOverwriteTrue", "Processing File");
f = createRelativeFile("/dest/" + LARGEIMAGE);
long overwrittenLastModified = f.lastModified();
assertTrue("File was not overwritten.",
lastModified < overwrittenLastModified);
|
public void | testSimpleScale()
expectLogContaining("testSimpleScale", "Processing File");
File f = createRelativeFile("/dest/" + LARGEIMAGE);
assertTrue(
"Did not create "+f.getAbsolutePath(),
f.exists());
|