I am newbie to Junit and i am writng a Test case for a MDB. BBasically i have to post a message and later check the records in couple of tables to check if the logic is executed correctly to populate the right tables.
Can any body direct me to some pointers.
Joined: Jul 11, 2001
The best way I know to do this is to extract the logic into a POJO which the MDB delegates to. You can then test the POJO as usual.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Jan 23, 2002
Or, by simply instantiating your MDB class and calling the onMessage() method on it yourself.