org.unitils.objectvalidation.rules
Class GetterAndSetterComplientRule
java.lang.Object
org.unitils.objectvalidation.rules.GetterAndSetterComplientRule
- All Implemented Interfaces:
- Rule
public class GetterAndSetterComplientRule
- extends Object
- implements Rule
Rule to validate that every field is accessible with a getter and a setter.
Also that if we set an object to the field that the getter will return it.
- Since:
- Oct 22, 2013
- Author:
- Jeroen Horemans, Matthieu Mestrez
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GetterAndSetterComplientRule
public GetterAndSetterComplientRule(ObjectCreator objectCreator,
ObjectCloner objectCloner)
validate
public void validate(Class<?> classToValidate)
- Description copied from interface:
Rule
- Will run the validations on the java class passed in parameter.
- Specified by:
validate in interface Rule
assertSetterIsComplient
protected void assertSetterIsComplient(Field fieldEntry,
Object actual,
Object simpleBean)
Copyright © 2013-2015. All Rights Reserved.