net.sourceforge.pmd.properties
Class MethodPropertyTest
java.lang.Object
net.sourceforge.pmd.properties.AbstractPropertyDescriptorTester
net.sourceforge.pmd.properties.MethodPropertyTest
public class MethodPropertyTest
- extends AbstractPropertyDescriptorTester
Evaluates the functionality of the MethodProperty descriptor by testing its
ability to catch creation errors (illegal args), flag invalid methods per the
allowable packages, and serialize/deserialize groups of methods onto/from a
string buffer.
We're using methods from java.lang classes for 'normal' constructors and
applying ones from java.util types as ones we expect to fail.
- Author:
- Brian Remedios
Methods inherited from class net.sourceforge.pmd.properties.AbstractPropertyDescriptorTester |
filter, getMultiFactory, getSingleFactory, randomBool, randomChar, randomChoice, randomDouble, randomFloat, randomInt, randomInt, randomString, testAsDelimitedString, testConstructors, testErrorFor, testErrorForBad, testFactoryMultiValueCustomDelimiter, testFactoryMultiValueDefaultDelimiter, testFactorySingleValue, testType, testValueFrom |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodPropertyTest
public MethodPropertyTest()
testAsStringOn
public void testAsStringOn()
testAsMethodOn
public void testAsMethodOn()
createBadProperty
protected PropertyDescriptor createBadProperty(boolean multiValue)
- Description copied from class:
AbstractPropertyDescriptorTester
- Attempt to create a property with faulty configuration values. This
method should throw an IllegalArgumentException if done correctly.
- Specified by:
createBadProperty
in class AbstractPropertyDescriptorTester
- Parameters:
multiValue
- boolean
- Returns:
- PropertyDescriptor
createBadValue
protected Object createBadValue(int count)
- Description copied from class:
AbstractPropertyDescriptorTester
- Return a value(s) that is known to be faulty per the general scope of the
descriptor.
- Specified by:
createBadValue
in class AbstractPropertyDescriptorTester
- Parameters:
count
- int
- Returns:
- Object
createProperty
protected PropertyDescriptor createProperty(boolean multiValue)
- Description copied from class:
AbstractPropertyDescriptorTester
- Creates and returns a properly configured property descriptor.
- Specified by:
createProperty
in class AbstractPropertyDescriptorTester
- Parameters:
multiValue
- boolean
- Returns:
- PropertyDescriptor
createValue
protected Object createValue(int count)
- Description copied from class:
AbstractPropertyDescriptorTester
- Return a legal value(s) per the general scope of the descriptor.
- Specified by:
createValue
in class AbstractPropertyDescriptorTester
- Parameters:
count
- int
- Returns:
- Object
Copyright © 2002–2015 InfoEther. All rights reserved.