Annotation Type DataSet

    • Element Detail

      • value

        String[] value
        Returns:
        list of dataset file names using 'resources' or 'resouces/datasets' folder as root directory. Single dataset with multiple comma separated dataset file names can also be provided. Also URL-Notation is supported, e.g: 'file:///C:/dir/users.xml' OR 'http://...'
        Default:
        {""}
      • executorId

        String executorId
        Returns:
        name of dataset executor for the given dataset. If not specified the default one will be used. Use this option to work with multiple database connections. Remember that each executor has its own connection.
        Default:
        ""
      • strategy

        SeedStrategy strategy
        Returns:
        DataSet seed strategy. Default is CLEAN_INSERT, meaning that DBUnit will clean and then insert data in tables present in provided dataset.
        Default:
        com.github.database.rider.core.api.dataset.SeedStrategy.CLEAN_INSERT
      • useSequenceFiltering

        boolean useSequenceFiltering
        Returns:
        if true dbunit will look at constraints and dataset to try to determine the correct ordering for the SQL statements
        Default:
        true
      • tableOrdering

        String[] tableOrdering
        Returns:
        a list of table names used to reorder DELETE operations to prevent failures due to circular dependencies
        Default:
        {}
      • disableConstraints

        boolean disableConstraints
        Default:
        false
      • fillIdentityColumns

        boolean fillIdentityColumns
        Returns:
        true if dataset contains values for identity columns (some databases like MS SQL Server have issues with such cases)
        Default:
        false
      • executeStatementsBefore

        String[] executeStatementsBefore
        Returns:
        a list of jdbc statements to execute before test
        Default:
        {}
      • executeStatementsAfter

        String[] executeStatementsAfter
        Returns:
        a list of jdbc statements to execute after test
        Default:
        {}
      • executeScriptsBefore

        String[] executeScriptsBefore
        Returns:
        a list of sql script files to execute before test. Note that commands inside sql file must be separated by ';'
        Default:
        {}
      • executeScriptsAfter

        String[] executeScriptsAfter
        Returns:
        a list of sql script files to execute after test. Note that commands inside sql file must be separated by ';'
        Default:
        {}
      • cleanBefore

        boolean cleanBefore
        Returns:
        if true Database Rider will try to delete database before test in a 'smart way' by using table ordering and brute force.
        Default:
        false
      • cleanAfter

        boolean cleanAfter
        Returns:
        if true Database Rider will try to delete database after test in a 'smart way'
        Default:
        false
      • transactional

        boolean transactional
        Returns:
        if true a transaction will be started before test and committed after test execution. Note that it will only work for JPA based tests, in other words, EntityManagerProvider.isEntityManagerActive() must be true.
        Default:
        false
      • provider

        Class<? extends DataSetProvider> provider
        Returns:
        a dataset provider implementation responsible for generating the dataset programatically instead of providing an external file defining the dataset.
        Default:
        com.github.database.rider.core.api.dataset.DataSetProvider.class
      • skipCleaningFor

        String[] skipCleaningFor
        By default ALL tables are cleaned when cleanBefore or cleanAfter is set to true. Allows user to provide tables which will NOT be cleaned in cleanBefore and cleanAfter.
        Returns:
        list of table names to skip the cleaning in cleanBefore and/or cleanAfter. If empty all tables will be cleaned when cleanBefore() or cleanAfter() is set to true
        Default:
        {}
      • replacers

        Class<? extends Replacer>[] replacers
        Returns:
        implementations of Replacer to be used as dataset replacement during seeding database. Note that DataSet level replacer will override global level replacers.
        Default:
        {}