public interface PropertiesTestDataBuilder extends StringBasedBuilder<PropertiesTestDataBuilder>
This interface specifies a test data loader which loads data from a java property file.
Because java property files are simple name-value maps, therefore the loaded result is
also a plain Values instance which stores key-value pairs.
The main method of this interface is the load(). It returns the loaded Values instance.
The loadString() method returns the property file content of the test data.
The StreamBasedBuilder.openStream() method opens a stream which contains this content.
By default, the file is loaded with UTF-8 character set. We can change this with the StringBasedBuilder.withCharset(java.nio.charset.Charset)
method.
TestDataBuilder.fromProperties(String)| Modifier and Type | Method and Description |
|---|---|
Values |
load()
Loads the test data from java property file(s).
|
String |
loadString()
Loads the test data from java property file(s).
|
withCharsetopenStreamValues load()
String loadString()
null.loadString in interface StringBasedBuilder<PropertiesTestDataBuilder>StringCreated by Kornél Simon, 2022