Package com.github.springtestdbunit.annotation

Examples of com.github.springtestdbunit.annotation.DbUnitConfiguration


    String databaseConnectionBeanName = null;
    String dataSetLoaderBeanName = null;
    Class<? extends DataSetLoader> dataSetLoaderClass = FlatXmlDataSetLoader.class;
    Class<? extends DatabaseOperationLookup> databaseOperationLookupClass = DefaultDatabaseOperationLookup.class;

    DbUnitConfiguration configuration = testContext.getTestClass().getAnnotation(DbUnitConfiguration.class);
    if (configuration != null) {
      if (logger.isDebugEnabled()) {
        logger.debug("Using @DbUnitConfiguration configuration");
      }
      databaseConnectionBeanName = configuration.databaseConnection();
      dataSetLoaderClass = configuration.dataSetLoader();
      dataSetLoaderBeanName = configuration.dataSetLoaderBean();
      databaseOperationLookupClass = configuration.databaseOperationLookup();
    }

    if (!StringUtils.hasLength(databaseConnectionBeanName)) {
      databaseConnectionBeanName = getDatabaseConnectionUsingCommonBeanNames(testContext);
    }
View Full Code Here

TOP

Related Classes of com.github.springtestdbunit.annotation.DbUnitConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.