private List<PotentialAssignment> allMemberValuesFor(Class<?> testClass, Class<?>... constructorParameterTypes) throws Throwable { return new AllMembersSupplier(new TestClass(testClass)) .getValueSources(ParameterSignature.signatures( testClass.getConstructor(constructorParameterTypes)) .get(0)); }
@Test public void dataPointsAnnotationMeansTreatAsArrayOnly() throws SecurityException, NoSuchMethodException { List<PotentialAssignment> valueSources = new AllMembersSupplier( new TestClass(HasDataPoints.class)) .getValueSources(ParameterSignature.signatures( HasDataPoints.class.getConstructor(Object.class)) .get(0)); assertThat(valueSources.size(), is(2)); }