|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.properties.AbstractPropertyDescriptorTester
public abstract class AbstractPropertyDescriptorTester
Base functionality for all concrete subclasses that evaluate type-specific property descriptors. Checks for error conditions during construction, error value detection, serialization, etc.
Field Summary | |
---|---|
static String |
allChars
|
static String |
alphaChars
|
static String |
alphaNumericChars
|
static String |
digitChars
|
static String |
punctuationChars
|
protected String |
typeName
|
static String |
whitespaceChars
|
Constructor Summary | |
---|---|
AbstractPropertyDescriptorTester(String typeName)
|
Method Summary | |
---|---|
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. |
protected PropertyDescriptorFactory |
getMultiFactory()
|
protected PropertyDescriptorFactory |
getSingleFactory()
|
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 |
testFactoryMultiValueCustomDelimiter()
|
void |
testFactoryMultiValueDefaultDelimiter()
|
void |
testFactorySingleValue()
|
void |
testType()
|
void |
testValueFrom()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final String typeName
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
Constructor Detail |
---|
public AbstractPropertyDescriptorTester(String typeName)
Method Detail |
---|
protected abstract Object createValue(int count)
count
- int
protected abstract Object createBadValue(int count)
count
- int
protected abstract PropertyDescriptor createProperty(boolean multiValue)
multiValue
- boolean
protected abstract PropertyDescriptor createBadProperty(boolean multiValue)
multiValue
- boolean
protected final PropertyDescriptorFactory getSingleFactory()
protected final PropertyDescriptorFactory getMultiFactory()
public void testFactorySingleValue()
public void testFactoryMultiValueDefaultDelimiter()
public void testFactoryMultiValueCustomDelimiter()
public 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
- int
public static String randomString(int length)
public static float randomFloat(float min, float max)
min
- floatmax
- float
public static double randomDouble(double min, double max)
min
- doublemax
- double
public 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
- char
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |