net.sf.qualitytest.blueprint.strategy.creation
Class BlueprintStringCreationStrategy

java.lang.Object
  extended by net.sf.qualitytest.blueprint.strategy.creation.ValueCreationStrategy<String>
      extended by 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

Constructor Summary
BlueprintStringCreationStrategy()
          Create a string creation strategy which creates strings with the default length (standard UUID).
BlueprintStringCreationStrategy(int maxLength)
           
 
Method Summary
 String createValue(Class<?> expectedClass)
          Create a new value which can be assigned to an attribute.
 
Methods inherited from class net.sf.qualitytest.blueprint.strategy.creation.ValueCreationStrategy
createValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlueprintStringCreationStrategy

public BlueprintStringCreationStrategy()
Create a string creation strategy which creates strings with the default length (standard UUID).


BlueprintStringCreationStrategy

public BlueprintStringCreationStrategy(@Nonnegative
                                       int maxLength)
Method Detail

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.