| org.apache.commons.io.testtools.FileBasedTestCase org.apache.commons.io.FileUtilsFileNewerTestCase
Method Summary | |
protected void | setUp() | protected void | tearDown() | public void | testIsFileNewer() Tests the isFileNewer(File, *) methods which a "normal" file. | protected void | testIsFileNewer(String description, File file, long time, boolean wantedResult) Tests the isFileNewer(File, *) methods which the specified conditions. | public void | testIsFileNewerImaginaryFile() Tests the isFileNewer(File, *) methods which a not existing file. | public void | testIsFileNewerNoDate() Tests the isFileNewer(File, Date) method without specifying a Date .
The test is successfull if the method throws an IllegalArgumentException . | public void | testIsFileNewerNoFile() Tests the isFileNewer(File, long) method without specifying a File .
The test is successfull if the method throws an IllegalArgumentException . | public void | testIsFileNewerNoFileReference() Tests the isFileNewer(File, File) method without specifying a reference File .
The test is successfull if the method throws an IllegalArgumentException . |
FileUtilsFileNewerTestCase | public FileUtilsFileNewerTestCase(String name)(Code) | | |
setUp | protected void setUp() throws Exception(Code) | | See Also: junit.framework.TestCase.setUp See Also: |
tearDown | protected void tearDown() throws Exception(Code) | | See Also: junit.framework.TestCase.tearDown See Also: |
testIsFileNewer | protected void testIsFileNewer(String description, File file, long time, boolean wantedResult)(Code) | | Tests the isFileNewer(File, *) methods which the specified conditions.
Creates :
- a
Date which represents the time reference
- a temporary file with the same last modification date than the time reference
Then compares (with the needed isFileNewer method) the last modification date of
the specified file with the specified time reference, the created Date and the temporary
file.
The test is successfull if the three comparaisons return the specified wanted result.
Parameters: description - describes the tested situation Parameters: file - the file of which the last modification date is compared Parameters: timeMillis - the time reference measured in milliseconds since the epoch See Also: FileUtils.isFileNewer(Filelong) See Also: FileUtils.isFileNewer(FileDate) See Also: FileUtils.isFileNewer(FileFile) |
testIsFileNewerNoDate | public void testIsFileNewerNoDate()(Code) | | Tests the isFileNewer(File, Date) method without specifying a Date .
The test is successfull if the method throws an IllegalArgumentException .
|
testIsFileNewerNoFile | public void testIsFileNewerNoFile()(Code) | | Tests the isFileNewer(File, long) method without specifying a File .
The test is successfull if the method throws an IllegalArgumentException .
|
testIsFileNewerNoFileReference | public void testIsFileNewerNoFileReference()(Code) | | Tests the isFileNewer(File, File) method without specifying a reference File .
The test is successfull if the method throws an IllegalArgumentException .
|
|
|