|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.commons.io.testtools.FileBasedTestCase
org.apache.commons.io.FileUtilsFileNewerTestCase
public class FileUtilsFileNewerTestCase
This is used to test FileUtils for correctness.
| Constructor Summary | |
|---|---|
FileUtilsFileNewerTestCase(java.lang.String name)
|
|
| Method Summary | |
|---|---|
protected void |
setUp()
|
protected void |
tearDown()
|
void |
testIsFileNewer()
Tests the isFileNewer(File, *) methods which a "normal" file. |
protected void |
testIsFileNewer(java.lang.String description,
java.io.File file,
long time,
boolean wantedResult)
Tests the isFileNewer(File, *) methods which the specified conditions. |
void |
testIsFileNewerImaginaryFile()
Tests the isFileNewer(File, *) methods which a not existing file. |
void |
testIsFileNewerNoDate()
Tests the isFileNewer(File, Date) method without specifying a Date. |
void |
testIsFileNewerNoFile()
Tests the isFileNewer(File, long) method without specifying a File. |
void |
testIsFileNewerNoFileReference()
Tests the isFileNewer(File, File) method without specifying a reference File. |
| Methods inherited from class org.apache.commons.io.testtools.FileBasedTestCase |
|---|
assertEqualContent, assertEqualContent, checkFile, checkWrite, checkWrite, createFile, createLineBasedFile, deleteFile, generateTestData, generateTestData, getTestDirectory, newFile |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileUtilsFileNewerTestCase(java.lang.String name)
| Method Detail |
|---|
protected void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.ExceptionTestCase.setUp()
protected void tearDown()
throws java.lang.Exception
tearDown in class junit.framework.TestCasejava.lang.ExceptionTestCase.tearDown()public void testIsFileNewer()
isFileNewer(File, *) methods which a "normal" file.
FileUtils#isFileNewer(File, long),
FileUtils#isFileNewer(File, Date),
FileUtils#isFileNewer(File, File)public void testIsFileNewerImaginaryFile()
isFileNewer(File, *) methods which a not existing file.
FileUtils#isFileNewer(File, long),
FileUtils#isFileNewer(File, Date),
FileUtils#isFileNewer(File, File)
protected void testIsFileNewer(java.lang.String description,
java.io.File file,
long time,
boolean wantedResult)
isFileNewer(File, *) methods which the specified conditions.
Creates :
Date which represents the time referenceisFileNewer method) the last modification date of
the specified file with the specified time reference, the created Date and the temporary
file.
description - describes the tested situationfile - the file of which the last modification date is comparedtimeMillis - the time reference measured in milliseconds since the epochFileUtils#isFileNewer(File, long),
FileUtils#isFileNewer(File, Date),
FileUtils#isFileNewer(File, File)public void testIsFileNewerNoFile()
isFileNewer(File, long) method without specifying a File.
IllegalArgumentException.
public void testIsFileNewerNoDate()
isFileNewer(File, Date) method without specifying a Date.
IllegalArgumentException.
public void testIsFileNewerNoFileReference()
isFileNewer(File, File) method without specifying a reference File.
IllegalArgumentException.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||