public class FileUtilsTestCase extends FileBasedTestCase
FileUtils| Constructor and Description |
|---|
FileUtilsTestCase(String name) |
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 FileUtilsTestCase(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 testGetFile()
FileUtils.getFile(String...) method.public void testGetFile_Parent()
FileUtils.getFile(File, String...) method.public void testGetTempDirectoryPath()
FileUtils.getTempDirectoryPath() method.public void testGetTempDirectory()
FileUtils.getTempDirectory() method.public void testGetUserDirectoryPath()
FileUtils.getUserDirectoryPath() method.public void testGetUserDirectory()
FileUtils.getUserDirectory() method.public void test_openInputStream_exists() throws Exception
Exceptionpublic void test_openInputStream_existsButIsDirectory() throws Exception
Exceptionpublic void test_openInputStream_notExists() throws Exception
Exceptionpublic void test_openOutputStream_noParentCreateFile() throws Exception
Exceptionpublic void test_openOutputStream_noParentNoFile() throws Exception
Exceptionpublic void test_openOutputStream_exists() throws Exception
Exceptionpublic void test_openOutputStream_existsButIsDirectory() throws Exception
Exceptionpublic void test_openOutputStream_notExists() throws Exception
Exceptionpublic void test_openOutputStream_notExistsCannotCreate() throws Exception
Exceptionpublic void testByteCountToDisplaySizeBigInteger()
public void testByteCountToDisplaySizeLong()
public void testToFile1() throws Exception
Exceptionpublic void testToFile2() throws Exception
Exceptionpublic void testToFile3() throws Exception
Exceptionpublic void testToFile4() throws Exception
Exceptionpublic void testToFile5() throws Exception
Exceptionpublic void testToFileUtf8() throws Exception
Exceptionpublic void testDecodeUrl()
public void testDecodeUrlLenient()
public void testDecodeUrlNullSafe()
public void testDecodeUrlEncodingUtf8()
public void testToFiles1() throws Exception
Exceptionpublic void testToFiles2() throws Exception
Exceptionpublic void testToFiles3() throws Exception
Exceptionpublic void testToFiles3a() throws Exception
Exceptionpublic void testToFiles4() throws Exception
Exceptionpublic void testToURLs1() throws Exception
Exceptionpublic void testToURLs3a() throws Exception
Exceptionpublic void testContentEquals() throws Exception
Exceptionpublic void testContentEqualsIgnoreEOL() throws Exception
Exceptionpublic void testCopyURLToFile() throws Exception
Exceptionpublic void testCopyURLToFileWithTimeout() throws Exception
Exceptionpublic void testForceMkdir() throws Exception
Exceptionpublic void testForceMkdirParent() throws Exception
Exceptionpublic void testSizeOfDirectory() throws Exception
Exceptionpublic void testSizeOfDirectoryAsBigInteger() throws Exception
Exceptionpublic void testSizeOf() throws Exception
FileUtils.sizeOf(File) method.Exceptionpublic void testSizeOfAsBigInteger() throws Exception
FileUtils.sizeOf(File) method.Exceptionpublic void testIsFileNewerOlder() throws Exception
Exceptionpublic void testCopyFile1() throws Exception
Exceptionpublic void testCopyFileToOutputStream() throws Exception
Exceptionpublic void IGNOREtestCopyFileLarge() throws Exception
Exceptionpublic void testCopyFile2() throws Exception
Exceptionpublic void testCopyToSelf() throws Exception
Exceptionpublic void testCopyFile2WithoutFileDatePreservation() throws Exception
Exceptionpublic void testCopyDirectoryToDirectory_NonExistingDest() throws Exception
Exceptionpublic void testCopyDirectoryToNonExistingDest() throws Exception
Exceptionpublic void testCopyDirectoryToExistingDest() throws Exception
Exceptionpublic void testCopyDirectoryFiltered() throws Exception
Exceptionpublic void testCopyDirectoryPreserveDates() throws Exception
Exceptionpublic void testCopyDirectoryToChild() throws Exception
Exceptionpublic void testCopyDirectoryToGrandChild() throws Exception
Exceptionpublic void testCopyDirectoryToItself() throws Exception
Exceptionpublic void testCopyDirectoryErrors() throws Exception
Exceptionpublic void testForceDeleteAFile1() throws Exception
Exceptionpublic void testForceDeleteAFile2() throws Exception
Exceptionpublic void testForceDeleteAFile3() throws Exception
Exceptionpublic void testCopyFile1ToDir() throws Exception
Exceptionpublic void testCopyFile2ToDir() throws Exception
Exceptionpublic void testForceDeleteDir() throws Exception
Exceptionpublic void testFileUtils() throws Exception
Exceptionpublic void testTouch() throws IOException
IOExceptionpublic void testListFiles() throws Exception
Exceptionpublic void testListFilesWithDirs() throws IOException
IOExceptionpublic void testIterateFiles() throws Exception
Exceptionpublic void testIterateFilesAndDirs() throws IOException
IOExceptionpublic void testReadFileToStringWithDefaultEncoding() throws Exception
Exceptionpublic void testReadFileToStringWithEncoding() throws Exception
Exceptionpublic void testReadFileToByteArray() throws Exception
Exceptionpublic void testReadLines() throws Exception
Exceptionpublic void testWriteStringToFile1() throws Exception
Exceptionpublic void testWriteStringToFile2() throws Exception
Exceptionpublic void testWriteStringToFile3() throws Exception
Exceptionpublic void testWriteCharSequence1() throws Exception
Exceptionpublic void testWriteCharSequence2() throws Exception
Exceptionpublic void testWriteByteArrayToFile() throws Exception
Exceptionpublic void testWriteByteArrayToFile_WithOffsetAndLength() throws Exception
Exceptionpublic void testWriteLines_4arg() throws Exception
Exceptionpublic void testWriteLines_4arg_Writer_nullData() throws Exception
Exceptionpublic void testWriteLines_4arg_nullSeparator() throws Exception
Exceptionpublic void testWriteLines_3arg_nullSeparator() throws Exception
Exceptionpublic void testWriteLines_5argsWithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteLines_5argsWithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteLines_4argsWithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteLines_4argsWithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteLinesEncoding_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteLinesEncoding_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteLines_3argsWithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteLines_3argsWithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteStringToFileWithEncoding_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteStringToFileWithEncoding_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteStringToFile_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteStringToFile_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteWithEncoding_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteWithEncoding_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception
Exceptionpublic void testWrite_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception
Exceptionpublic void testWrite_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteByteArrayToFile_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteByteArrayToFile_WithAppendOptionFalse_ShouldDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteByteArrayToFile_WithOffsetAndLength_WithAppendOptionTrue_ShouldNotDeletePreviousFileLines() throws Exception
Exceptionpublic void testWriteByteArrayToFile_WithOffsetAndLength_WithAppendOptionTrue_ShouldDeletePreviousFileLines() throws Exception
Exceptionpublic void testChecksumCRC32() throws Exception
Exceptionpublic void testChecksum() throws Exception
Exceptionpublic void testChecksumOnNullFile() throws Exception
Exceptionpublic void testChecksumOnNullChecksum() throws Exception
Exceptionpublic void testChecksumOnDirectory() throws Exception
Exceptionpublic void testChecksumDouble() throws Exception
Exceptionpublic void testDeleteQuietlyForNull()
public void testDeleteQuietlyDir() throws IOException
IOExceptionpublic void testDeleteQuietlyFile() throws IOException
IOExceptionpublic void testDeleteQuietlyNonExistent()
public void testMoveFile_Rename() throws Exception
Exceptionpublic void testMoveFile_CopyDelete() throws Exception
Exceptionpublic void testMoveFile_CopyDelete_Failed() throws Exception
Exceptionpublic void testMoveFile_Errors() throws Exception
Exceptionpublic void testMoveFileToDirectory() throws Exception
Exceptionpublic void testMoveFileToDirectory_Errors() throws Exception
Exceptionpublic void testMoveDirectory_Rename() throws Exception
Exceptionpublic void testMoveDirectory_CopyDelete() throws Exception
Exceptionpublic void testMoveDirectory_Errors() throws Exception
Exceptionpublic void testMoveDirectoryToDirectory() throws Exception
Exceptionpublic void testMoveDirectoryToDirectory_Errors() throws Exception
Exceptionpublic void testMoveToDirectory() throws Exception
Exceptionpublic void testMoveToDirectory_Errors() throws Exception
ExceptionCopyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.