DataProviderResolverContext { public boolean useDataProviderNameConvention() { return METHOD_NAME_TO_USE_CONVENTION.equals(dataProviderName); } 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 testUseDataProviderNameConventionShouldReturnFalseIfDataProviderNameIsSet() { final String dataProviderName = "dataProviderName"; DataProviderResolverContext underTest = new DataProviderResolverContext(testMethod, resolverClasses, resolveStrategy, locations, dataProviderAnnotationClass, dataProviderName); boolean result = underTest.useDataProviderNameConvention(); assertThat(result).isFalse(); }
@Test public void testUseDataProviderNameConventionShouldReturnTrueIfDatProviderIsUseConvention() { final String dataProviderName = DataProviderResolverContext.METHOD_NAME_TO_USE_CONVENTION; DataProviderResolverContext underTest = new DataProviderResolverContext(testMethod, resolverClasses, resolveStrategy, locations, dataProviderAnnotationClass, dataProviderName); boolean result = underTest.useDataProviderNameConvention(); assertThat(result).isTrue(); }