![JAR search and dependency download from the Maven repository](/logo.png)
autofixture.publicinterface.inline.strings.LowercaseStringGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autofixturegenerator Show documentation
Show all versions of autofixturegenerator Show documentation
An attempt to reimplement core features of a popular .NET anonymous value generator - AutoFixture - in
Java
The newest version!
package autofixture.publicinterface.inline.strings;
import autofixture.interfaces.FixtureContract;
import autofixture.interfaces.InlineGeneratorsFactory;
import autofixture.interfaces.InlineInstanceGenerator;
/**
* Created by grzes on 26.11.2016.
*/
public class LowercaseStringGenerator implements InlineInstanceGenerator {
private final int length;
private InlineGeneratorsFactory inlineGeneratorsFactory;
public LowercaseStringGenerator(int length, InlineGeneratorsFactory inlineGeneratorsFactory) {
this.length = length;
this.inlineGeneratorsFactory = inlineGeneratorsFactory;
}
@Override
public String next(FixtureContract fixture) {
return fixture.create(
inlineGeneratorsFactory.stringOfLength(length)).toLowerCase();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy