RSS Feed for This PostCurrent Article

Develop Flexible Unit Test using Data Storm

Data Storm is a free open source data base browser. While there are millions of data base browsers freely available online, Data Storm is different
as it can be launched directly from within your Java code. This enables you to see and modify data that otherwise may not be available to you.

Data Storm is useful when resolving problems during xUnit testing involving databases.

public void test_order_save() {
    Order orderToBeFound = new Order(SOME_ID, SOME_NAME1);
    orderToBeFound.save();
    new DataStorm().show( connection, "SELECT * FROM orders o WHERE o.id = " + SOME_ID );
    assertNotNull(orderToBeFound.load(SOME_ID));
}

image

Popularity: 1% [?]


Trackback URL


RSS Feed for This PostPost a Comment