Package com.hybris.datahub.core.io
Class TextFileUnitTest
java.lang.Object
com.hybris.datahub.core.io.TextFileUnitTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidtearDown()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
Constructor Details
-
TextFileUnitTest
public TextFileUnitTest()
-
-
Method Details
-
tearDown
public void tearDown() -
testCreatesTextFileWithASpecificPath
public void testCreatesTextFileWithASpecificPath() -
testCreatesTextFileWithASpecifiedDirectoryAndFileName
public void testCreatesTextFileWithASpecifiedDirectoryAndFileName() -
testCreatesTextFileWithASpecificFile
public void testCreatesTextFileWithASpecificFile() -
testDoesNotSaveFileFileBeforeContentWasWritten
public void testDoesNotSaveFileFileBeforeContentWasWritten() -
testSaveCreatesFileIfItDoesNotExist
- Throws:
IOException
-
testSavePersistsTheContent
- Throws:
IOException
-
testSaveReplacesPreviousContent
- Throws:
IOException
-
testDeleteDoesNothingIfTheFileWasNeverSaved
- Throws:
IOException
-
testDeleteRemovesAPreviouslySavedFile
- Throws:
IOException
-
testReadReturnsEmptyTextBeforeTheFileWasEverSaved
- Throws:
IOException
-
testAppendAddsToPreviousContentAndDoesNotReplaceIt
- Throws:
IOException
-
testAppendLineAddsLineOfTextToThePreviousContent
- Throws:
IOException
-
testReadLineReturnsTextOnTheLineSpecifiedByItsNumber
- Throws:
IOException
-
testReadLineReturnsNullForLineNumber0
- Throws:
IOException
-
testReadLineReturnsNullWhenLineNumberExceedsNumberOfLinesInTheFile
- Throws:
IOException
-
testReadLineReturnsNullWhenNothingHasBeenSavedIntoTheFileYet
- Throws:
IOException
-
testReadLineTreatsTextWithoutLineBreaksAsSingleLine
- Throws:
IOException
-
testReadLineReturnsEmptyStringForLinesWithNoTextPresent
- Throws:
IOException
-
testToStringContainsTheFilePath
public void testToStringContainsTheFilePath() -
testFilesAreEqualWhenTheyAreBasedOnTheSamePath
public void testFilesAreEqualWhenTheyAreBasedOnTheSamePath() -
testFilesAreNotEqualWhenTheyAreNotOfTheSameClass
public void testFilesAreNotEqualWhenTheyAreNotOfTheSameClass() -
testFilesAreNotEqualWhenTheirPathesAreDifferent
public void testFilesAreNotEqualWhenTheirPathesAreDifferent() -
testHashCodeIsTheSameWhenFilesAreEqual
public void testHashCodeIsTheSameWhenFilesAreEqual() -
testHashCodeIsDifferentWhenFilesAreNotEqual
public void testHashCodeIsDifferentWhenFilesAreNotEqual() -
testCreatesNonExistingPathForTheFileName
- Throws:
IOException
-