[英]Is Unitils project alive?
anybody knows whether unitils project is still alive. 任何人都知道unitils项目是否还活着。 On there pages last version is 3.3 in maven repository it is 3.4.2.(Actually there is google cached version of their pages where the version is said to be 3.4.2)
页面最后一个版本在maven存储库中是3.3。它是3.4.2。(实际上有他们的页面的谷歌缓存版本,其版本据说是3.4.2)
Anyway is there any replacement for this project. 无论如何,这个项目有任何替代品。 I kind of lack the vivid community around and really don't want to be bound to dying project.
我有点缺乏生动的社区,真的不想被迫死的项目。
Unitils seems to be almost abandoned nowadays. 现在,单位似乎几乎被抛弃了。 Project is available on the GitHub here and you can look at its history and activity.
项目可在GitHub上找到 ,您可以查看其历史和活动。
Anyways my two cents... 无论如何我的两分钱......
Unitils has serious drawbacks: Unitils有严重的缺点:
DbUnit DbUnit的
For database-driven apps it may seem that interesting way to go is a plain DbUnit + Spring-Test or alternatively some 3rd party tools: 对于数据库驱动的应用程序,似乎有趣的方法是简单的DbUnit + Spring-Test或者第三方工具:
@DataSet
annotation and is actively developed on the github, also is constantly updated to use the newest versions of DbUnit and Spring Framework. @DataSet
注释,并在github上积极开发,也不断更新以使用最新版本的DbUnit和Spring Framework。 @DatabaseSetup
annotation). @DatabaseSetup
注释)。 Both are very similar, but personally I find DbUnit confusing, quite cumbersome and time-consuming. 两者都非常相似,但我个人觉得DbUnit令人困惑,相当麻烦和耗时。 Why?
为什么? Try to maintain large amount of small xml files and you find out what I mean.
尝试维护大量的小xml文件,你就会发现我的意思。 Also combining multiple data sets is really hard.
结合多个数据集真的很难。
DbSetup DbSetup
My choice. 我的选择。 DbSetup doesn't need external xml/ json files, is extremely convenient and allows you to combine freely multiple data sets using fluent builders.
DbSetup不需要外部xml / json文件,非常方便,允许您使用流畅的构建器自由组合多个数据集。 Just look at code below:
看看下面的代码:
final Operation sql =
sequenceOf(
CommonOperations.DELETE_ALL,
CommonOperations.INSERT_REFERENCE_DATA,
prepareSpecialData()
);
DbSetup dbSetup = new DbSetup(new DataSourceDestination(dataSource), sql);
Everything is java, so you can freely refactor it, extract methods etc. 一切都是java,所以你可以自由地重构它,提取方法等。
Hope it helps. 希望能帮助到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.