Package net.andreinc.mockneat.unit.text
Class FromFiles
java.lang.Object
net.andreinc.mockneat.abstraction.MockUnitBase
net.andreinc.mockneat.unit.text.FromFiles
public class FromFiles extends MockUnitBase
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description static FromFilesfiles()Returns aFromFilesobject that can used to generate random strings from a given text file.MockUnitStringfrom(java.lang.String path)Generates a newMockUnitStringthat can be used to generate String lines from the givenpath.
-
Constructor Details
-
Method Details
-
files
Returns a
FromFilesobject that can used to generate random strings from a given text file.Note: The file is loaded in memory. For the moment there is no functionality to "unload" it.
- Returns:
- A re-usable
FromFilesobject.
-
from
Generates a new
MockUnitStringthat can be used to generate String lines from the givenpath.Note: The files needs to exist and have read rights.
- Parameters:
path- The path of the file from the disk.- Returns:
- A new
MockUnitString
-