Skip navigation

Monthly Archives: May 2008

I think I fell in love with this editor

Update:
Nice starting guide.

Database testing – putting everything together

Create – database instance is not necessary
Prepare – clean tables, load data to datasource
Assert – verify your datasource contains expected data

@Test
public void testGetCustomerFromDao()
{
//business dao object
final CustomerDao customerDao = new CustomerDao();

// initialize DbAssert
final DbAssert dbAssert = DbAssert.init(“org/testfw/TestSource.xml”);

// create a “fake” datasource. Stanalone instance of HSQLDB will be created (no database required).
final DbSource myTestSource = dbAssert.fake_source(“testSrc”,”org/testfw/testSourceSchema.sql”, getClass());

// [...]

Hybrid Version Control

At some point in time your version control system (VCS) may become a bottleneck in your development process. Why? There are several reasons:

the access to the VCS server can be too sloooow: slow connection, many developers, limited server resources; in fact it is not easy to scale your centralized VCS server because it is, well… [...]

More about database testing

Following up on DbAssert I’ve made a few changes to it. They are really minor ones.

Ability to add additional conditions like this:

dbAssert.condition(“id”, 1).addCondition(“name”, “John Doe”);

Another change which brings more real functionality is:

// checks if count of the records returned equals given value
dbAssert.assert_count(0);

So we’ve all here been using DbAssert for two months already and I think [...]

Getting rid of the logging in Java

I’m going to tell you a story.
A few days ago I was working on some component which is quite simple but very cohesive. It was fun developing it and see how it’s organized and behaves. I like when the code looks pretty, when there are good names for methods and variables, when it’s very easy [...]