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

java.lang.Object
  extended by net.sf.qualitytest.blueprint.strategy.creation.ValueCreationStrategy<Enum<?>>
      extended by net.sf.qualitytest.blueprint.strategy.creation.RandomEnumCreationStrategy
All Implemented Interfaces:
CreationStrategy<Enum<?>>

public class RandomEnumCreationStrategy
extends ValueCreationStrategy<Enum<?>>

Creation strategy which creates a random enum constant during construction of a blueprint.

Author:
Dominik Seichter

Constructor Summary
RandomEnumCreationStrategy()
           
 
Method Summary
 Enum<?> createValue(Class<?> expectedClazz)
          Blueprint an enum value using the default configuration.
 
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

RandomEnumCreationStrategy

public RandomEnumCreationStrategy()
Method Detail

createValue

public Enum<?> createValue(Class<?> expectedClazz)
Blueprint an enum value using the default configuration.

This method returns the a randomly selected value of a given enumeration.

Specified by:
createValue in class ValueCreationStrategy<Enum<?>>
Parameters:
expectedClazz - the class of an enumeration
Returns:
a valid enum value


Copyright © 2012-2013. All Rights Reserved.