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

nitils.2.3.source-code.unitils-default.properties Maven / Gradle / Ivy

Go to download

Unitils provides utilities to further simplify unit-testing with JUnit, DBUnit, EasyMock Hibernate and Spring. The goal is to make unit-testing easy and maintainable by offering utilities such as automatic DB-schema maintainance and equality assertion through reflection.

There is a newer version: 3.4.6
Show newest version
####################################
# Default configuration of Unitils #
####################################

# This file contains default configuration values for unitils. This file should not be edited.
# All properties in this file can be overridden, either in the project specific properties file
# (unitils.properties) or in the local properties file (configured by unitils.configuration.customFileName).

# Name or path of the project specific properties file. The system will try to find this file in the classpath (recommended),
# the user home folder or the local filesystem
unitils.configuration.customFileName=unitils.properties
# Name or path of the user specific properties file. This file may contain the necessary parameters to connect to the
# developer's own unit test schema. It is recommended to override the name of this file in the project specific properties
# file, to include the name of the project. The system will try to find this file in the classpath, the user home folder
# (recommended) or the local filesystem.
unitils.configuration.localFileName=unitils-local.properties

# List of modules that is loaded. Overloading this list is normally not useful, unless you want to add a custom 
# module. Disabling a module can be performed by setting unitils.module..enabled to false.
# If a module's specific dependencies are not found (e.g. hibernate is not in you classpath), this module is not loaded,
# even if it is in this list and the enabled property is set to true. It's therefore not strictly necessary to disable
# any of these modules.
unitils.modules=database,dbunit,hibernate,mock,easymock,inject,spring,jpa

#### Unitils core configuration ###
# For each module, the implementation class is listed in unitils.module..className, the sequence of the
# execution of their code is influenced by unitils.module..runAfter. Disabling a module can be performed by
# setting unitils.module..enabled to false.
unitils.module.database.className=org.unitils.database.DatabaseModule
unitils.module.database.runAfter=
unitils.module.database.enabled=true

unitils.module.hibernate.className=org.unitils.orm.hibernate.HibernateModule
unitils.module.hibernate.runAfter=
unitils.module.hibernate.enabled=true

unitils.module.dbunit.className=org.unitils.dbunit.DbUnitModule
unitils.module.dbunit.runAfter=
unitils.module.dbunit.enabled=true

unitils.module.mock.className=org.unitils.mock.MockModule
unitils.module.mock.runAfter=
unitils.module.mock.enabled=true

unitils.module.easymock.className=org.unitils.easymock.EasyMockModule
unitils.module.easymock.runAfter=
unitils.module.easymock.enabled=true

unitils.module.inject.className=org.unitils.inject.InjectModule
unitils.module.inject.runAfter=
unitils.module.inject.enabled=true

unitils.module.spring.className=org.unitils.spring.SpringModule
unitils.module.spring.runAfter=database
unitils.module.spring.enabled=true

unitils.module.jpa.className=org.unitils.orm.jpa.JpaModule
unitils.module.jpa.runAfter=
unitils.module.jpa.enabled=true

### DatabaseModule Configuration ###

## Full qualified class name of an implementation of org.unitils.database.config.DataSourceFactory. This class is used
# to provide a DataSource for all database unit tests and for the DBMaintainer.
org.unitils.database.config.DataSourceFactory.implClassName=org.unitils.database.config.PropertiesDataSourceFactory

# Properties for the PropertiesDataSourceFactory
database.driverClassName=
database.url=
database.userName=
database.password=

# This property specifies the underlying DBMS implementation. Supported values are 'oracle', 'db2', 'mysql', 'hsqldb',
# 'postgresql', 'derby' and 'mssql'. The value of this property defines which vendor specific implementations of
# DbSupport and ConstraintsDisabler are chosen.
database.dialect=

# A comma-separated list of all used database schemas. The first schema name is the default one, if no schema name is
# specified in for example a dbunit data set, this default one is used.
# A schema name is case sensitive if it's surrounded by database identifier quotes (e.g. " for oracle)
database.schemaNames=


### DatabaseModule's DbMaintainer configuration ###

# If set to true, the DBMaintainer will be used to update the unit test database schema. This is done once for each
# test run, when creating the DataSource that provides access to the unit test database.
updateDataBaseSchema.enabled=false

# Indicates the database must be recreated from scratch when an already executed script is updated. If false, the
# DBMaintainer will give an error when an existing script is updated.
dbMaintainer.fromScratch.enabled=true
# Indicates whether a from scratch update should be performed when the previous update failed, but
# none of the scripts were modified since that last update. If false a new update will be tried only when
# changes were made to the script files.
dbMaintainer.keepRetryingAfterError.enabled=false

# Fully qualified classnames of implementations of org.unitils.core.dbsupport.DbSupport.
org.unitils.core.dbsupport.DbSupport.implClassName.oracle=org.unitils.core.dbsupport.OracleDbSupport
org.unitils.core.dbsupport.DbSupport.implClassName.oracle9=org.unitils.core.dbsupport.Oracle9DbSupport
org.unitils.core.dbsupport.DbSupport.implClassName.oracle10=org.unitils.core.dbsupport.Oracle10DbSupport
org.unitils.core.dbsupport.DbSupport.implClassName.hsqldb=org.unitils.core.dbsupport.HsqldbDbSupport
org.unitils.core.dbsupport.DbSupport.implClassName.mysql=org.unitils.core.dbsupport.MySqlDbSupport
org.unitils.core.dbsupport.DbSupport.implClassName.db2=org.unitils.core.dbsupport.Db2DbSupport
org.unitils.core.dbsupport.DbSupport.implClassName.postgresql=org.unitils.core.dbsupport.PostgreSqlDbSupport
org.unitils.core.dbsupport.DbSupport.implClassName.derby=org.unitils.core.dbsupport.DerbyDbSupport
org.unitils.core.dbsupport.DbSupport.implClassName.mssql=org.unitils.core.dbsupport.MsSqlDbSupport


# Determines how the database stores non-quoted identifiers (with identifiers, we mean names for tables, columns, etc.) 
# Possible values are lower_case, upper_case, mixed_case and auto
# If auto is specified, the database metadata is used to determine the correct value
database.storedIndentifierCase.oracle=auto
database.storedIndentifierCase.hsqldb=auto
database.storedIndentifierCase.mysql=auto
database.storedIndentifierCase.db2=auto
database.storedIndentifierCase.postgresql=auto
database.storedIndentifierCase.derby=auto
database.storedIndentifierCase.mssql=auto

# Determines the string the database uses to quote identifiers, i.e. make them case-sensitive 
# (with identifiers, we mean names for tables, columns, etc.)
# Leave empty if quoting is not supported.
# If auto is specified, the database metadata is used to determine the correct value
database.identifierQuoteString.oracle=auto
database.identifierQuoteString.hsqldb=auto
database.identifierQuoteString.mysql=auto
database.identifierQuoteString.db2=auto
database.identifierQuoteString.postgresql=auto
database.identifierQuoteString.derby=auto
database.identifierQuoteString.mssql=auto


# Fully qualified name of the implementation of org.unitils.dbmaintainer.maintainer.version.ExecutedScriptInfoSource that is used.
# The default value is 'org.unitils.dbmaintainer.maintainer.version.ExecutedScriptInfoSource', which retrieves the database version
# from the updated database schema itself. Another implementation could e.g. retrieve the version from a file.
org.unitils.dbmaintainer.version.ExecutedScriptInfoSource.implClassName=org.unitils.dbmaintainer.version.impl.DefaultExecutedScriptInfoSource
# Name of the table that contains the database update script that have already been executed on the database.
dbMaintainer.executedScriptsTableName=dbmaintain_scripts
# Name of the column in which the name of the executed script file is stored
dbMaintainer.fileNameColumnName=file_name
dbMaintainer.fileNameColumnSize=150
# Name of the column in which the version index string of the executed script is stored.
dbMaintainer.versionColumnName=version
dbMaintainer.versionColumnSize=25
# Name of the column in which the last modification date of the executed script file is stored.
dbMaintainer.fileLastModifiedAtColumnName=file_last_modified_at
# Name of the column in which the checksum of the content of the script is stored.
dbMaintainer.checksumColumnName=checksum
dbMaintainer.checksumColumnSize=50
# Name of the column that stores the timestamp at which the script was executed
dbMaintainer.executedAtColumnName=executed_at
dbMaintainer.executedAtColumnSize=20
# Name of the column in which is stored whether the script ran without error or not.
dbMaintainer.succeededColumnName=succeeded
# Set this property to true if the dbmaintain_scripts table should be created automatically if not found.
# If false, an exception is thrown when the table is not found, indicating how to create it manually. 
# This property is false by default to be sure that a database is cleared by accident. If an executed 
# scripts table is available, we assume it to be a database managed by dbmaintain.
dbMaintainer.autoCreateExecutedScriptsTable=false
dbMaintainer.timestampFormat=yyyy-MM-dd HH:mm:ss

# Fully qualified name of the implementation of org.unitils.dbmaintainer.maintainer.script.ScriptSource that is used.
# The default value is 'org.unitils.dbmaintainer.maintainer.script.FileScriptSource', which will retrieve the scripts
# from the local file system.
org.unitils.dbmaintainer.script.ScriptSource.implClassName=org.unitils.dbmaintainer.script.impl.DefaultScriptSource
# Defines where the scripts can be found that must be executed on the database. Multiple locations may be
# configured, separated by comma's. A script location can be a folder or a jar file.
dbMaintainer.script.locations=
# Extension of the files containing the database update scripts
dbMaintainer.script.fileExtensions=sql,ddl
# Comma separated list of directories and files in which the post processing database scripts are
# located. Directories in this list are recursively search for files.
dbMaintainer.postProcessingScript.directoryName=postprocessing

# Defines whether script last modification dates can be used to decide that it didn't change. If set to true,
# the dbmaintainer will decide that a file didn't change since the last time if it's last modification date hasn't
# changed. If it did change, it will first calculate the checksum of the file to verify that the content really
# changed. Setting this property to true improves performance: if set to false the checksum of every script must
# be calculated for each run of the dbmaintainer. It's advised to set this property to true when using the dbmainainer
# to update a unit test database. For applying changes to an environment that can only be updated incrementally (e.g. 
# a database use by testers or even the production database), this parameter should be false, since working with last 
# modification dates is not guaranteed to be 100% bulletproof (although unlikely, it is possible that a different 
# version of the same file is checked out on different systems on exactly the same time).
dbMaintainer.useScriptFileLastModificationDates.enabled=true

# Fully qualified name of the implementation of org.unitils.dbmaintainer.script.ScriptRunner that is used. The
# default value is 'org.unitils.dbmaintainer.script.SQLScriptRunner', which executes a regular SQL script.
org.unitils.dbmaintainer.script.ScriptRunner.implClassName=org.unitils.dbmaintainer.script.impl.DefaultScriptRunner
# Fully qualified classname of the implementation of org.unitils.dbmaintainer.script.ScriptParser
org.unitils.dbmaintainer.script.ScriptParser.implClassName=org.unitils.dbmaintainer.script.impl.DefaultScriptParser
org.unitils.dbmaintainer.script.ScriptParser.implClassName.oracle=org.unitils.dbmaintainer.script.impl.OracleScriptParser
org.unitils.dbmaintainer.script.ScriptParser.implClassName.oracle9=org.unitils.dbmaintainer.script.impl.OracleScriptParser
org.unitils.dbmaintainer.script.ScriptParser.implClassName.oracle10=org.unitils.dbmaintainer.script.impl.OracleScriptParser
# Set to true if characters can be escaped by using backslashes. For example '\'' instead of the standard SQL way ''''.
# Note this is not standard SQL behavior and is therefore disabled by default.
org.unitils.dbmaintainer.script.ScriptParser.backSlashEscapingEnabled=false

# If set to true, an implementation of org.unitils.dbmaintainer.constraints.ConstraintsDisabler will be used to disable
# the foreign key and not null constraints of the unit test database schema.
# The ConstraintsDisabler is configured using the properties specified below. The property with key 'database.dialect'
# specifies which implementation is used.
dbMaintainer.disableConstraints.enabled=true
# Fully qualified classname of the implementation of org.unitils.dbmaintainer.structure.ConstraintsDisabler
org.unitils.dbmaintainer.structure.ConstraintsDisabler.implClassName=org.unitils.dbmaintainer.structure.impl.DefaultConstraintsDisabler

# If set to true, all sequences and identity columns are set to a sufficiently high value, so that test data can be 
# inserted without having manually chosen test record IDs clashing with automatically generated keys.
dbMaintainer.updateSequences.enabled=true
# Fully qualified classname of the implementation of org.unitils.dbmaintainer.sequences.SequenceUpdater
org.unitils.dbmaintainer.structure.SequenceUpdater.implClassName=org.unitils.dbmaintainer.structure.impl.DefaultSequenceUpdater
# Lowest acceptable value of a sequence in a unit test database. The SequenceUpdater will make sure all sequences
# have this value or higher before proceeding
sequenceUpdater.sequencevalue.lowestacceptable=1000

# Fully qualified classname of the implementation of org.unitils.dbmaintainer.clear.DBClearer
org.unitils.dbmaintainer.clean.DBClearer.implClassName=org.unitils.dbmaintainer.clean.impl.DefaultDBClearer
# Fully qualified classname of the implementation of org.unitils.dbmaintainer.clean.DBCleaner.
org.unitils.dbmaintainer.clean.DBCleaner.implClassName=org.unitils.dbmaintainer.clean.impl.DefaultDBCleaner

# Indicates whether the database should be cleaned before data updates are executed by the dbMaintainer. If true, the
# records of all database tables, except the ones listed in 'dbMaintainer.preserve.*' are deleted
dbMaintainer.cleanDb.enabled=true

# Comma separated list of database items that may not be dropped or cleared by the DB maintainer when
# updating the database from scratch (dbMaintainer.fromScratch.enabled=true).
# Schemas can also be preserved entirely. If identifiers are quoted (eg "" for oracle) they are considered
# case sensitive. Items that do not have a schema prefix are considered to be in the default schema, which 
# is the first schema listed in the property database.schemaNames
dbMaintainer.preserve.schemas=
dbMaintainer.preserve.tables=
dbMaintainer.preserve.views=
dbMaintainer.preserve.materializedViews=
dbMaintainer.preserve.synonyms=
dbMaintainer.preserve.sequences=

# Comma separated list of tables that will not be emptied when the db maintainer performs a database
# update, if the property dbMaintainer.cleanDb.enabled is set to true.
# Tables listed here will still be dropped when the db maintainer performs a from scratch update. If this is not desirable
# you should add the tablename to the dbMaintainer.preserve.tables property instead
# Schemas can also be preserved entirely. If identifiers are quoted (eg "" for oracle) they are considered 
# case sensitive. Items that do not have a schema prefix are considered to be in the default schema, which 
# is the first schema listed in the property database.schemaNames
dbMaintainer.preserveDataOnly.schemas=
dbMaintainer.preserveDataOnly.tables=

# If set to true an XSD or DTD will be generated that represents the structure of the database schema. This XSD or DTD can be
# used in datafiles to verify if they are up-to-date and to enable code completion.
dbMaintainer.generateDataSetStructure.enabled=true
# Fully qualified name of the implementation of org.unitils.dbmaintainer.structure.DataSetStructureGenerator that is used.
# org.unitils.dbmaintainer.structure.impl.XsdDataSetStructureGenerator can be used to generate XSDs
# org.unitils.dbmaintainer.structure.impl.DtdDataSetStructureGenerator can be used to generate DTDs
org.unitils.dbmaintainer.structure.DataSetStructureGenerator.implClassName=org.unitils.dbmaintainer.structure.impl.XsdDataSetStructureGenerator
# DbUnit data set dtd file path
dataSetStructureGenerator.dtd.filename=
# DbUnit data set xsd file path
dataSetStructureGenerator.xsd.dirName=
# Suffix to use when generating complex types for tables
dataSetStructureGenerator.xsd.complexTypeSuffix=__type


# Fully qualified classname of the implementation of UnitilsTransactionManager that is used
org.unitils.database.transaction.UnitilsTransactionManager.implClassName=org.unitils.database.transaction.impl.DefaultUnitilsTransactionManager
# If set to true, the datasource injected onto test fields annotated with @TestDataSource or retrieved using 
# DatabaseUnitils#getTransactionalDataSource are wrapped in a transactional proxy
dataSource.wrapInTransactionalProxy=true


# Default operation that is used for getting a dbunit dataset into the database. Should be the fully qualified classname
# of an implementation of org.unitils.dbunit.datasetloadstrategy.DataSetLoadStrategy
DbUnitModule.DataSet.loadStrategy.default=org.unitils.dbunit.datasetloadstrategy.impl.CleanInsertLoadStrategy
# Default factory that is used to create a dataset object from a file for the @DataSet annotation
DbUnitModule.DataSet.factory.default=org.unitils.dbunit.datasetfactory.impl.MultiSchemaXmlDataSetFactory
# Default factory that is used to create a dataset object from a file for the @ExpectedDataSet annotation
DbUnitModule.ExpectedDataSet.factory.default=org.unitils.dbunit.datasetfactory.impl.MultiSchemaXmlDataSetFactory

# Fully qualified classname of the data set resolver
org.unitils.dbunit.datasetfactory.DataSetResolver.implClassName=org.unitils.dbunit.datasetfactory.impl.DefaultDataSetResolver
# If set to true, the data set name will be prefixed with the package name of the test (with . replaced by /)
dbUnit.datasetresolver.prefixWithPackageName=true
# Optional prefix for the data set file name. If it starts with '/' it is treated as an absolute path on the
# file system, if not, it is treated as a classpath resource. 
dbUnit.datasetresolver.pathPrefix=


# Fully qualified classnames of the different, dbms specific implementations of org.dbunit.dataset.datatype.IDataTypeFactory
org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.oracle=org.dbunit.ext.oracle.OracleDataTypeFactory
org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.oracle9=org.dbunit.ext.oracle.OracleDataTypeFactory
org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.oracle10=org.dbunit.ext.oracle.OracleDataTypeFactory
org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.db2=org.dbunit.ext.db2.Db2DataTypeFactory
org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.hsqldb=org.dbunit.ext.hsqldb.HsqldbDataTypeFactory
org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.mysql=org.dbunit.ext.mysql.MySqlDataTypeFactory
org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.postgresql=org.dbunit.dataset.datatype.DefaultDataTypeFactory
org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.derby=org.dbunit.dataset.datatype.DefaultDataTypeFactory
org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.mssql=org.dbunit.ext.mssql.MsSqlDataTypeFactory


### DatabaseModule configuration ###
# Default behavior concerning execution of tests in a transaction. Supported values are 'disabled', 'commit' and 'rollback'.
# If set to disabled, test are not executed in a transaction by default. If set to commit, each test is run in a transaction,
# which is committed. If set to rollback, each test is run in a transaction, which is rolled back. 
DatabaseModule.Transactional.value.default=commit

### MockModule configuration ###
mockModule.logFullScenarioReport=false
mockModule.logObservedScenario=false
mockModule.logDetailedObservedScenario=false
mockModule.logSuggestedAsserts=false

### EasyMockModule configuration ###
# Default value for order checking of method invocation on mocks. Supported values are 'none' and 'strict'
EasyMockModule.RegularMock.invocationOrder.default=none
# Default value for the calls property of mocks. Supported values are 'lenient' and 'strict'
EasyMockModule.RegularMock.calls.default=strict
# Default value for order checking of method invocation on mocks. Supported values are 'none' and 'strict'
EasyMockModule.Mock.invocationOrder.default=none
EasyMockModule.Mock.calls.default=strict
EasyMockModule.Mock.order.default=lenient
EasyMockModule.Mock.dates.default=strict
EasyMockModule.Mock.defaults.default=ignore_defaults
# Indicates whether after every test, the expected method calls are verified on all mock objects that were injected on
# fields annotated with @Mock or created with EasyMockUnitils.createMock (i.e. the verify() method is invoked on all
# these mocks.
EasyMockModule.autoVerifyAfterTest.enabled=true

### InjectModule configuration ###
# Mode of accessing properties
InjectModule.InjectIntoStatic.restore.default=old_value
InjectModule.InjectIntoByType.propertyAccess.default=field
InjectModule.InjectIntoStaticByType.restore.default=old_value
InjectModule.InjectIntoStaticByType.propertyAccess.default=field
InjectModule.TestedObject.createIfNull.enabled=true

### HibernateModule configuration ###
HibernateModule.configuration.implClassName=org.hibernate.cfg.AnnotationConfiguration

### JpaModule configuration ###
# Indicates the JPA persistence provider that is used. Supported values are 'hibernate', 'toplink' and 'openjpa' 
jpa.persistenceProvider=hibernate

org.unitils.orm.jpa.util.JpaProviderSupport.implClassName.hibernate=org.unitils.orm.jpa.util.provider.hibernate.HibernateJpaProviderSupport
org.unitils.orm.jpa.util.JpaProviderSupport.implClassName.toplink=org.unitils.orm.jpa.util.provider.toplink.ToplinkJpaProviderSupport
org.unitils.orm.jpa.util.JpaProviderSupport.implClassName.openjpa=org.unitils.orm.jpa.util.provider.openjpa.OpenJpaProviderSupport

### SpringModule configuration ###
SpringModule.applicationContextFactory.implClassName=org.unitils.spring.util.ClassPathXmlApplicationContextFactory

spring.core.someClass.name=org.springframework.core.io.Resource




© 2015 - 2024 Weber Informatics LLC | Privacy Policy