ЗАПИСИ С МЕТКОЙ #dao

[← Вернуться ко всем меткам]

Integrating DBUnit with Spring TestContext Framework

The Spring Framework 2.5 came with a new TestContext framework which made integration testing of database code a lot easier. It provided annotations to declaratively specify the application context to execute your test in, annotations to mark the transactions for test methods, and also some base test classes for JUnit and TestNG. In the following article I will describe an approach for integrating the TestContext framework with the DBUnit framework, which in turn allows you to initialize the test database before test and verify its condition with the expected dataset after the test is complete.

[читать далее]