net.sf.qualitytest.blueprint.strategy.creation
Class RandomEnumCreationStrategy
java.lang.Object
net.sf.qualitytest.blueprint.strategy.creation.ValueCreationStrategy<Enum<?>>
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
Method Summary |
Enum<?> |
createValue(Class<?> expectedClazz)
Blueprint an enum value using the default configuration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomEnumCreationStrategy
public RandomEnumCreationStrategy()
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.