DataProviderResolverContext { public DataProviderResolverContext(Method testMethod, List<Class<? extends DataProviderMethodResolver>> resolverClasses, ResolveStrategy resolveStrategy, List<Class<?>> locations, Class<? extends Annotation> dataProviderAnnotationClass, String dataProviderName) { this.testMethod = checkNotNull(testMethod, "'testMethod' must not be null"); this.resolverClasses = new ArrayList<Class<? extends DataProviderMethodResolver>>( checkNotNull(resolverClasses, "'resolverClasses' must not be null")); this.resolveStrategy = checkNotNull(resolveStrategy, "'resolveStrategy' must not be null"); checkNotNull(locations, "'locations' must not be null"); if (locations.isEmpty()) { this.locations = Collections.<Class<?>>singletonList(testMethod.getDeclaringClass()); } else { this.locations = new ArrayList<Class<?>>(locations); } this.dataProviderAnnotationClass = checkNotNull(dataProviderAnnotationClass, "'dataProviderAnnotationClass' must not be null"); this.dataProviderName = checkNotNull(dataProviderName, "'dataProviderName' must not be null"); } DataProviderResolverContext(Method testMethod,
            List<Class<? extends DataProviderMethodResolver>> resolverClasses, ResolveStrategy resolveStrategy,
            List<Class<?>> locations, Class<? extends Annotation> dataProviderAnnotationClass,
            String dataProviderName); static List<Class<?>> generateLocations(Class<?> testClass, Class<?>... explicitLocations); boolean useDataProviderNameConvention(); Method getTestMethod(); List<Class<? extends DataProviderMethodResolver>> getResolverClasses(); ResolveStrategy getResolveStrategy(); List<Class<?>> getLocations(); Class<? extends Annotation> getDataProviderAnnotationClass(); String getDataProviderName(); static final String METHOD_NAME_TO_USE_CONVENTION; }
@Test public void testDataProviderResolverContext() { DataProviderResolverContext result = new DataProviderResolverContext(testMethod, resolverClasses, resolveStrategy, locations, dataProviderAnnotationClass, dataProviderName); assertThat(result).isNotNull(); assertThat(result.getTestMethod()).isEqualTo(testMethod); assertThat(result.getResolverClasses()).isNotSameAs(resolverClasses).isEqualTo(resolverClasses); assertThat(result.getResolveStrategy()).isEqualTo(resolveStrategy); assertThat(result.getLocations()).isNotSameAs(locations).isEqualTo(locations); assertThat(result.getDataProviderAnnotationClass()).isEqualTo(dataProviderAnnotationClass); assertThat(result.getDataProviderName()).isEqualTo(dataProviderName); }