net.sf.qualitytest.blueprint.strategy.creation
Class BlueprintStringCreationStrategy
java.lang.Object
net.sf.qualitytest.blueprint.strategy.creation.ValueCreationStrategy<String>
net.sf.qualitytest.blueprint.strategy.creation.BlueprintStringCreationStrategy
- All Implemented Interfaces:
- CreationStrategy<String>
public class BlueprintStringCreationStrategy
- extends ValueCreationStrategy<String>
Strategy which creates random strings using Blueprint.string()
.
Optionally a maximum length for the generated strings can be specified.
- Author:
- Dominik Seichter
Method Summary |
String |
createValue(Class<?> expectedClass)
Create a new value which can be assigned to an attribute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlueprintStringCreationStrategy
public BlueprintStringCreationStrategy()
- Create a string creation strategy which creates strings with the default length (standard UUID).
BlueprintStringCreationStrategy
public BlueprintStringCreationStrategy(@Nonnegative
int maxLength)
createValue
public String createValue(Class<?> expectedClass)
- Description copied from class:
ValueCreationStrategy
- Create a new value which can be assigned to an attribute.
- Specified by:
createValue
in class ValueCreationStrategy<String>
- Parameters:
expectedClass
- which is requested.
- Returns:
- a new value
Copyright © 2012-2013. All Rights Reserved.