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
-
Fields inherited from class net.andreinc.mockneat.abstraction.MockUnitBase
mockNeat
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
FromFiles
public FromFiles()
-
FromFiles
public FromFiles(MockNeat mockNeat)
-
-
Method Detail
-
files
public static FromFiles 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
public MockUnitString from(java.lang.String path)
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
-
-