autofixture.publicinterface.inline.CharacterGenerator Maven / Gradle / Ivy
The newest version!
package autofixture.publicinterface.inline;
import autofixture.implementationdetails.CircularList;
import autofixture.interfaces.FixtureContract;
import autofixture.interfaces.InlineInstanceGenerator;
public class CharacterGenerator implements
InlineInstanceGenerator {
private final CircularList letters;
public CharacterGenerator(final String possibleCharacters) {
this.letters = CircularList
.fromCharactersIn(possibleCharacters);
}
@Override
public Character next(final FixtureContract fixture) {
return letters.next();
}
}