public abstract class AbstractPropertyDescriptorTester extends Object
Modifier and Type | Field and Description |
---|---|
static String |
allChars |
static String |
alphaChars |
static String |
alphaNumericChars |
static String |
digitChars |
static String |
punctuationChars |
static String |
whitespaceChars |
Constructor and Description |
---|
AbstractPropertyDescriptorTester() |
Modifier and Type | Method and Description |
---|---|
protected abstract PropertyDescriptor |
createBadProperty(boolean multiValue)
Attempt to create a property with faulty configuration values.
|
protected abstract Object |
createBadValue(int count)
Return a value(s) that is known to be faulty per the general scope of the descriptor.
|
protected abstract PropertyDescriptor |
createProperty(boolean multiValue)
Creates and returns a properly configured property descriptor.
|
protected abstract Object |
createValue(int count)
Return a legal value(s) per the general scope of the descriptor.
|
protected static char[] |
filter(char[] chars,
char removeChar)
Method filter.
|
static boolean |
randomBool() |
static char |
randomChar(char[] characters)
Method randomChar.
|
static Object |
randomChoice(Object[] items)
Method randomChoice.
|
static double |
randomDouble(double min,
double max)
Method randomDouble.
|
static float |
randomFloat(float min,
float max)
Method randomFloat.
|
static int |
randomInt()
Method randomInt.
|
static int |
randomInt(int min,
int max)
Method randomInt.
|
static String |
randomString(int length) |
void |
testAsDelimitedString() |
void |
testConstructors() |
void |
testErrorFor() |
void |
testErrorForBad() |
void |
testType() |
void |
testValueFrom() |
public static final String punctuationChars
public static final String whitespaceChars
public static final String digitChars
public static final String alphaChars
public static final String alphaNumericChars
public static final String allChars
protected abstract Object createValue(int count)
count
- intprotected abstract Object createBadValue(int count)
count
- intprotected abstract PropertyDescriptor createProperty(boolean multiValue)
multiValue
- booleanprotected abstract PropertyDescriptor createBadProperty(boolean multiValue)
multiValue
- booleanpublic void testConstructors()
public void testAsDelimitedString()
public void testValueFrom()
public void testErrorFor()
public void testErrorForBad()
public void testType()
public static boolean randomBool()
public static int randomInt()
public static int randomInt(int min, int max)
min
- intmax
- intpublic static String randomString(int length)
public static float randomFloat(float min, float max)
min
- floatmax
- floatpublic static double randomDouble(double min, double max)
min
- doublemax
- doublepublic static char randomChar(char[] characters)
characters
- char[]public static Object randomChoice(Object[] items)
items
- Object[]protected static final char[] filter(char[] chars, char removeChar)
chars
- char[]removeChar
- charCopyright © 2002–2014 InfoEther. All rights reserved.