use of org.hibernate.search.util.impl.integrationtest.common.rule.BackendConfiguration in project hibernate-search by hibernate.
the class DocumentationSetupHelper method testParamsForBothAnnotationsAndProgrammatic.
public static List<DocumentationSetupHelper> testParamsForBothAnnotationsAndProgrammatic(BackendConfiguration backendConfiguration, Consumer<ProgrammaticMappingConfigurationContext> programmaticMappingContributor) {
HibernateOrmSearchMappingConfigurer mappingConfigurer = context -> programmaticMappingContributor.accept(context.programmaticMapping());
List<DocumentationSetupHelper> result = new ArrayList<>();
// Annotation-based mapping
result.add(withSingleBackend(backendConfiguration, null));
// Programmatic mapping
result.add(withSingleBackend(backendConfiguration, mappingConfigurer));
return result;
}
use of org.hibernate.search.util.impl.integrationtest.common.rule.BackendConfiguration in project hibernate-search by hibernate.
the class DocumentationSetupHelper method testParamsForBothAnnotationsAndProgrammatic.
public static List<DocumentationSetupHelper> testParamsForBothAnnotationsAndProgrammatic(BackendSetupStrategy backendSetupStrategy, BackendConfiguration defaultBackendConfiguration, Set<Class<?>> additionalAnnotatedClasses, Consumer<ProgrammaticMappingConfigurationContext> programmaticMappingContributor) {
List<DocumentationSetupHelper> result = new ArrayList<>();
// Annotation-based mapping
HibernateOrmSearchMappingConfigurer annotationMappingConfigurer = additionalAnnotatedClasses.isEmpty() ? null : context -> context.annotationMapping().add(additionalAnnotatedClasses);
result.add(new DocumentationSetupHelper(backendSetupStrategy, null, annotationMappingConfigurer));
// Programmatic mapping
HibernateOrmSearchMappingConfigurer programmaticMappingConfigurer = context -> programmaticMappingContributor.accept(context.programmaticMapping());
result.add(new DocumentationSetupHelper(backendSetupStrategy, false, programmaticMappingConfigurer));
return result;
}
Aggregations