/** * Create a test runner for the class under test and limit the setters to be tested. * * @param clazz Class under test. * @param beanInfo Info on methods and properties of class under test. * @param methodsUnderTest set used to limit properties being tested. */ public SetterTestRunner( Class<T> clazz, BeanInfo beanInfo, Set<PropertyDescriptor> methodsUnderTest) { super(clazz, beanInfo); this.methodsUnderTest = methodsUnderTest; this.declaredFields = TestAid.getDeclaredFieldsFromLineage(clazz) .stream() .filter(field -> !field.isSynthetic()) .collect(toMap(field -> field.getName(), identity())); }
/** * Create a test runner for the class under test. * * @param clazz Class under test. * @param beanInfo Info on methods and properties of class under test. */ public SetterTestRunner(Class<T> clazz, BeanInfo beanInfo) { this( clazz, beanInfo, TestAid.getFieldsToCheck(beanInfo, Collections.emptySet(), Collections.emptySet())); }