public class ExceptionsContractTest extends ValidationTestBase
Validator
and
BeanDescriptor
throw the correct exceptions as per the spec.Modifier and Type | Class and Description |
---|---|
static class |
ExceptionsContractTest.ExceptionThrowingBean |
static class |
ExceptionsContractTest.Person |
factory, validator
Constructor and Description |
---|
ExceptionsContractTest() |
Modifier and Type | Method and Description |
---|---|
void |
testExceptionThrowingBean()
Checks that the correct exception is thrown when validating a bean whose
getter throws an exception.
|
void |
testGetConstraintsForEmptyProperty()
Checks that an
IllegalArgumentException is thrown when calling
BeanDescriptor.getConstraintsForProperty(String) with an invalid
property name. |
void |
testGetConstraintsForNullProperty()
Checks that an
IllegalArgumentException is thrown when calling
BeanDescriptor.getConstraintsForProperty(String) with an invalid
property name. |
void |
testValidateEmptyPropertyName()
Checks that an
IllegalArgumentException is thrown when passing an
empty property name. |
void |
testValidateIncompatiblePrimitiveValue()
Enforces the "not a valid object property" part of the
IllegalArgumentException
declaration on Validator.validateValue(Class, String, Object, Class...) |
void |
testValidateIncompatibleValue()
Enforces the "not a valid object property" part of the
IllegalArgumentException
declaration on Validator.validateValue(Class, String, Object, Class...) |
void |
testValidateInvalidPropertyName()
Checks that an
IllegalArgumentException is thrown when passing an
invalid property name. |
void |
testValidateNullGroup()
Checks that an
IllegalArgumentException is thrown when passing
null as group array. |
void |
testValidateNullPropertyName()
Checks that an
IllegalArgumentException is thrown when passing a
null property name. |
void |
testValidatePropertyNullGroup()
Checks that an
IllegalArgumentException is thrown when passing
null as group array in a
Validator.validateProperty(Object, String, Class...) call. |
void |
testValidatePropertyOnNullBean()
Checks that an
IllegalArgumentException is thrown when trying to
validate a property on a null object. |
void |
testValidateValueEmptyPropertyName()
Checks that an
IllegalArgumentException is thrown when passing an
empty property name to
Validator.validateValue(Class, String, Object, Class...) . |
void |
testValidateValueInvalidPropertyName()
Checks that an
IllegalArgumentException is thrown when passing an
invalid property name to
Validator.validateValue(Class, String, Object, Class...) . |
void |
testValidateValueNullGroup()
Checks that an
IllegalArgumentException is thrown when calling
Validator.validateValue(Class, String, Object, Class...) with a
null group array. |
void |
testValidateValueNullPropertyName()
Checks that an
IllegalArgumentException is thrown when passing a
null property name to
Validator.validateValue(Class, String, Object, Class...) . |
void |
testValidateValueOnNullClass()
Checks that an
IllegalArgumentException is thrown when calling
Validator.validateValue(Class, String, Object, Class...) with a
null class. |
createValidator, setUp, setupValidatorFactory
public void testExceptionThrowingBean()
public void testValidateNullGroup()
IllegalArgumentException
is thrown when passing
null
as group array.public void testValidateNullPropertyName()
IllegalArgumentException
is thrown when passing a
null
property name.public void testValidateEmptyPropertyName()
IllegalArgumentException
is thrown when passing an
empty property name.public void testValidateInvalidPropertyName()
IllegalArgumentException
is thrown when passing an
invalid property name.public void testValidatePropertyOnNullBean()
IllegalArgumentException
is thrown when trying to
validate a property on a null object.public void testValidatePropertyNullGroup()
IllegalArgumentException
is thrown when passing
null
as group array in a
Validator.validateProperty(Object, String, Class...)
call.public void testValidateValueOnNullClass()
IllegalArgumentException
is thrown when calling
Validator.validateValue(Class, String, Object, Class...)
with a
null
class.public void testValidateValueNullPropertyName()
IllegalArgumentException
is thrown when passing a
null
property name to
Validator.validateValue(Class, String, Object, Class...)
.public void testValidateValueEmptyPropertyName()
IllegalArgumentException
is thrown when passing an
empty property name to
Validator.validateValue(Class, String, Object, Class...)
.public void testValidateValueInvalidPropertyName()
IllegalArgumentException
is thrown when passing an
invalid property name to
Validator.validateValue(Class, String, Object, Class...)
.public void testValidateValueNullGroup()
IllegalArgumentException
is thrown when calling
Validator.validateValue(Class, String, Object, Class...)
with a
null
group array.public void testValidateIncompatibleValue()
IllegalArgumentException
declaration on Validator.validateValue(Class, String, Object, Class...)
public void testValidateIncompatiblePrimitiveValue()
IllegalArgumentException
declaration on Validator.validateValue(Class, String, Object, Class...)
public void testGetConstraintsForNullProperty()
IllegalArgumentException
is thrown when calling
BeanDescriptor.getConstraintsForProperty(String)
with an invalid
property name.public void testGetConstraintsForEmptyProperty()
IllegalArgumentException
is thrown when calling
BeanDescriptor.getConstraintsForProperty(String)
with an invalid
property name.Copyright © 2010–2020 The Apache Software Foundation. All rights reserved.