public class FileUtilsFileNewerTestCase extends FileBasedTestCase
| Constructor and Description |
|---|
FileUtilsFileNewerTestCase(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
setUp() |
protected void |
tearDown() |
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. |
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. |
assertEqualContent, assertEqualContent, checkFile, checkWrite, checkWrite, createFile, createLineBasedFile, deleteFile, generateTestData, generateTestData, getTestDirectory, newFileassertEquals, 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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toStringpublic FileUtilsFileNewerTestCase(String name)
protected void setUp() throws Exception
setUp in class junit.framework.TestCaseExceptionTestCase.setUp()protected void tearDown() throws Exception
tearDown in class junit.framework.TestCaseExceptionTestCase.tearDown()public void testIsFileNewer()
isFileNewer(File, *) methods which a "normal" file.public void testIsFileNewerImaginaryFile()
isFileNewer(File, *) methods which a not existing file.protected void testIsFileNewer(String description, 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 comparedtime - 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.Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.