Package com.hybris.datahub.core.io
Class TextFileUnitTest
- java.lang.Object
-
- com.hybris.datahub.core.io.TextFileUnitTest
-
@UnitTest public class TextFileUnitTest extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TextFileUnitTest()
-
Method Summary
-
-
-
Method Detail
-
tearDown
public void tearDown()
-
testCreatesTextFileWithASpecificPath
public void testCreatesTextFileWithASpecificPath()
-
testCreatesTextFileWithASpecifiedDirectoryAndFileName
public void testCreatesTextFileWithASpecifiedDirectoryAndFileName()
-
testCreatesTextFileWithASpecificFile
public void testCreatesTextFileWithASpecificFile()
-
testDoesNotSaveFileFileBeforeContentWasWritten
public void testDoesNotSaveFileFileBeforeContentWasWritten()
-
testSaveCreatesFileIfItDoesNotExist
public void testSaveCreatesFileIfItDoesNotExist() throws java.io.IOException- Throws:
java.io.IOException
-
testSavePersistsTheContent
public void testSavePersistsTheContent() throws java.io.IOException- Throws:
java.io.IOException
-
testSaveReplacesPreviousContent
public void testSaveReplacesPreviousContent() throws java.io.IOException- Throws:
java.io.IOException
-
testDeleteDoesNothingIfTheFileWasNeverSaved
public void testDeleteDoesNothingIfTheFileWasNeverSaved() throws java.io.IOException- Throws:
java.io.IOException
-
testDeleteRemovesAPreviouslySavedFile
public void testDeleteRemovesAPreviouslySavedFile() throws java.io.IOException- Throws:
java.io.IOException
-
testReadReturnsEmptyTextBeforeTheFileWasEverSaved
public void testReadReturnsEmptyTextBeforeTheFileWasEverSaved() throws java.io.IOException- Throws:
java.io.IOException
-
testAppendAddsToPreviousContentAndDoesNotReplaceIt
public void testAppendAddsToPreviousContentAndDoesNotReplaceIt() throws java.io.IOException- Throws:
java.io.IOException
-
testAppendLineAddsLineOfTextToThePreviousContent
public void testAppendLineAddsLineOfTextToThePreviousContent() throws java.io.IOException- Throws:
java.io.IOException
-
testReadLineReturnsTextOnTheLineSpecifiedByItsNumber
public void testReadLineReturnsTextOnTheLineSpecifiedByItsNumber() throws java.io.IOException- Throws:
java.io.IOException
-
testReadLineReturnsNullForLineNumber0
public void testReadLineReturnsNullForLineNumber0() throws java.io.IOException- Throws:
java.io.IOException
-
testReadLineReturnsNullWhenLineNumberExceedsNumberOfLinesInTheFile
public void testReadLineReturnsNullWhenLineNumberExceedsNumberOfLinesInTheFile() throws java.io.IOException- Throws:
java.io.IOException
-
testReadLineReturnsNullWhenNothingHasBeenSavedIntoTheFileYet
public void testReadLineReturnsNullWhenNothingHasBeenSavedIntoTheFileYet() throws java.io.IOException- Throws:
java.io.IOException
-
testReadLineTreatsTextWithoutLineBreaksAsSingleLine
public void testReadLineTreatsTextWithoutLineBreaksAsSingleLine() throws java.io.IOException- Throws:
java.io.IOException
-
testReadLineReturnsEmptyStringForLinesWithNoTextPresent
public void testReadLineReturnsEmptyStringForLinesWithNoTextPresent() throws java.io.IOException- Throws:
java.io.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
public void testCreatesNonExistingPathForTheFileName() throws java.io.IOException- Throws:
java.io.IOException
-
-