| Constructor and Description |
|---|
TextFileUnitTest() |
public void tearDown()
public void testCreatesTextFileWithASpecificPath()
public void testCreatesTextFileWithASpecifiedDirectoryAndFileName()
public void testCreatesTextFileWithASpecificFile()
public void testDoesNotSaveFileFileBeforeContentWasWritten()
public void testSaveCreatesFileIfItDoesNotExist()
throws IOException
IOExceptionpublic void testSavePersistsTheContent()
throws IOException
IOExceptionpublic void testSaveReplacesPreviousContent()
throws IOException
IOExceptionpublic void testDeleteDoesNothingIfTheFileWasNeverSaved()
throws IOException
IOExceptionpublic void testDeleteRemovesAPreviouslySavedFile()
throws IOException
IOExceptionpublic void testReadReturnsEmptyTextBeforeTheFileWasEverSaved()
throws IOException
IOExceptionpublic void testAppendAddsToPreviousContentAndDoesNotReplaceIt()
throws IOException
IOExceptionpublic void testAppendLineAddsLineOfTextToThePreviousContent()
throws IOException
IOExceptionpublic void testReadLineReturnsTextOnTheLineSpecifiedByItsNumber()
throws IOException
IOExceptionpublic void testReadLineReturnsNullForLineNumber0()
throws IOException
IOExceptionpublic void testReadLineReturnsNullWhenLineNumberExceedsNumberOfLinesInTheFile()
throws IOException
IOExceptionpublic void testReadLineReturnsNullWhenNothingHasBeenSavedIntoTheFileYet()
throws IOException
IOExceptionpublic void testReadLineTreatsTextWithoutLineBreaksAsSingleLine()
throws IOException
IOExceptionpublic void testReadLineReturnsEmptyStringForLinesWithNoTextPresent()
throws IOException
IOExceptionpublic void testToStringContainsTheFilePath()
public void testFilesAreEqualWhenTheyAreBasedOnTheSamePath()
public void testFilesAreNotEqualWhenTheyAreNotOfTheSameClass()
public void testFilesAreNotEqualWhenTheirPathesAreDifferent()
public void testHashCodeIsTheSameWhenFilesAreEqual()
public void testHashCodeIsDifferentWhenFilesAreNotEqual()
public void testCreatesNonExistingPathForTheFileName()
throws IOException
IOExceptionCopyright © 2017 SAP SE. All Rights Reserved.