All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.stapi.test.schemaintegration.SchemaIntegrationTestConfig Maven / Gradle / Ivy

There is a newer version: 0.3.2
Show newest version
package ai.stapi.test.schemaintegration;

import ai.stapi.schema.adHocLoaders.GenericAdHocModelDefinitionsLoader;
import ai.stapi.schema.scopeProvider.ScopeCacher;
import ai.stapi.schema.structureSchemaProvider.DefaultStructureSchemaFinder;
import ai.stapi.schema.structureSchemaProvider.StructureSchemaFinder;
import ai.stapi.schema.structureSchemaProvider.StructureSchemaProvider;
import ai.stapi.schema.structuredefinition.loader.AdHocStructureDefinitionLoader;
import ai.stapi.schema.structuredefinition.loader.StructureDefinitionLoader;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Profile;


@Profile("test")
@TestConfiguration
public class SchemaIntegrationTestConfig {

  @Bean
  public static StructureDefinitionLoader structureDefinitionLoader(
      GenericAdHocModelDefinitionsLoader genericAdHocModelDefinitionsLoader,
      ScopeCacher scopeCacher
  ) {
    return new AdHocStructureDefinitionLoader(genericAdHocModelDefinitionsLoader, scopeCacher);
  }

  @Bean
  public static StructureSchemaFinder structureSchemaFinder(
      StructureSchemaProvider structureSchemaProvider
  ) {
    return new DefaultStructureSchemaFinder(structureSchemaProvider);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy