test unit test

Improve your tests with Mockito's capture

Unit Testing mandates to test the unit in isolation. In order to achieve that, the general consensus is to design our classes in a decoupled way using DI. In this paradigm, whether using a framework or not, whether using compile-time or runtime compilation, object instantiation is the responsibility of dedicated factories. In particular, this means the new keyword should be used only in those factories. Sometimes, however, having a dedicated factory just doesn’t fit. This is the case when

dbunit derby javadb unit test

Speeding up your DBUnit tests with JavaDB

Introduction to DBUnit With the developed use of JUnit, many additions were made to it. These additions take advantage of the pluggable nature of JUnit. One of these contribution is DBUnit. DBUnit enables your unit tests to: preload the database with datas pertaining to your current test only,run your unit test (as usual),remove the data you preloaded in order to put the database in the same it was before your additions. In effect, you can now test your DAO classes. Let’s take a (very)

junit testng unit test

The unit test war : JUnit vs TestNG

What is unit testing anyway? If you’re in contact with Java development, as a developer, an architect or a project manager, you can’t have heard of unit testing, as every quality method enforces its use. From Wikipedia: Unit testing is a test (often automated) that validates that individual units of source code are working properly. A unit is the smallest testable part of an application. In procedural programming a unit may be an individual program, function, procedure, etc., wh