[Unitils]初識Unitils
http://www.unitils.org/summary.html#
Summary
Unitils is an open source library aimed at making unit and integration testing easy and maintainable.
It is divided into several modules, each of them providing extra support for a certain aspect of your unit and integration tests. If you for example need mocking for your tests, just include unitils-mock as a dependency. If you would also want to load DbUnit data sets, just include unitils-dbunit.
Below you can find a list of the modules and their features. Click on the title to go to the corresponding tutorial and examples.
Features
Reflection assert
Equality assertion through reflection
Possibility to ignore order of collections and Java default/null values
Mock module - Makes mocking easy and maintainable
Simple syntax for defining and asserting invoked behavior
Gives you the best possible feedback so you can easily find out why a test is failing
Argument matchers, partial mocking, stubbing behavior, dummy objects...
Inject module - Easily inject test artifacts into classes and instances
Inject values by type and name
Inject into static fields, e.g. singletons, and automatically reset the old value after the test
IO module - Support for performing IO in tests
Creating temporary files and directories
Loading the contents of files into objects
Database testing - Support for testing with databases and loading of DbUnit data sets
Simplify test database connection setup
Support for setting up a separate schema/database per developer
Transactional testing
Easy loading of data sets
Multi-schema data sets
Expected data set assertions
Automatic test database maintenance - Use DbMaintain to automatically bring your unit test databases up to date before running your tests
Automatic maintenance of databases with support for incremental, repeatable and post processing scripts
Automatically disable constraints and set sequences to a minimum value
Generating an XSD of the database structure for dataset xml files
Hibernate module - Support for Hibernate database testing
Hibernate SessionFactory creation and session management
Automatically test the mapping of JPA entities / hibernate mapped objects with the database
Spring module - Support for testing when your project uses Spring
ApplicationContext configuration and easy injection of spring managed beans into a unit test
Support for using a Spring-configured Hibernate SessionFactory in unit tests.
EasyMock module - Helps you set up tests that use EasyMock as a mocking framework
Simplify EasyMock mock object creation
EasyMock argument matching using reflection equality
Summary
Unitils is an open source library aimed at making unit and integration testing easy and maintainable.
It is divided into several modules, each of them providing extra support for a certain aspect of your unit and integration tests. If you for example need mocking for your tests, just include unitils-mock as a dependency. If you would also want to load DbUnit data sets, just include unitils-dbunit.
Below you can find a list of the modules and their features. Click on the title to go to the corresponding tutorial and examples.
Features
Reflection assert
Equality assertion through reflection
Possibility to ignore order of collections and Java default/null values
Mock module - Makes mocking easy and maintainable
Simple syntax for defining and asserting invoked behavior
Gives you the best possible feedback so you can easily find out why a test is failing
Argument matchers, partial mocking, stubbing behavior, dummy objects...
Inject module - Easily inject test artifacts into classes and instances
Inject values by type and name
Inject into static fields, e.g. singletons, and automatically reset the old value after the test
IO module - Support for performing IO in tests
Creating temporary files and directories
Loading the contents of files into objects
Database testing - Support for testing with databases and loading of DbUnit data sets
Simplify test database connection setup
Support for setting up a separate schema/database per developer
Transactional testing
Easy loading of data sets
Multi-schema data sets
Expected data set assertions
Automatic test database maintenance - Use DbMaintain to automatically bring your unit test databases up to date before running your tests
Automatic maintenance of databases with support for incremental, repeatable and post processing scripts
Automatically disable constraints and set sequences to a minimum value
Generating an XSD of the database structure for dataset xml files
Hibernate module - Support for Hibernate database testing
Hibernate SessionFactory creation and session management
Automatically test the mapping of JPA entities / hibernate mapped objects with the database
Spring module - Support for testing when your project uses Spring
ApplicationContext configuration and easy injection of spring managed beans into a unit test
Support for using a Spring-configured Hibernate SessionFactory in unit tests.
EasyMock module - Helps you set up tests that use EasyMock as a mocking framework
Simplify EasyMock mock object creation
EasyMock argument matching using reflection equality
相關文章
- 用Unitils測試BaseDao遇到的問題總結
- 初識MybatisMyBatis
- 初識 DockerDocker
- rocketmq初識MQ
- 初識 reduxRedux
- 初識GitGit
- Express初識Express
- Kafka 初識Kafka
- 初識 “HTML”HTML
- 初識GolangGolang
- 初識dockerDocker
- 初識RedisRedis
- 初識GOGo
- 初識promisePromise
- 初識VueVue
- 初識JSJS
- 初識jQueryjQuery
- 初識JavaScriptJavaScript
- 初識WebAssemblyWeb
- 初識機器學習機器學習
- 初識JVMJVM
- 初識HaphoopOOP
- 初識JavaWEBJavaWeb
- 初識HTTPHTTP
- 初識canvasCanvas
- 初識TcpTCP
- webpack初識Web
- 初識ARKit
- view初識View
- 初識CSSCSS
- 初識PHPPHP
- TypeScript 初識TypeScript
- 初識mysqlMySql
- 初識htmlHTML
- 初識WebWeb
- 初識Fink
- 初識PostgreSqlSQL
- AsterixDB初識AST