Well ideally I would like to avoid setting up the abstract class but at lest I have a starting point that I believe I can make it to work. I do have one more question though. Is it possible somehow to automate this?
I have my business class that recieves hibernate classes vie a constructor and each one of those gets the Session object. Can I somehow connect this automatically when my test runs or should I create new objects manually each time? Thanks On Sun, Sep 22, 2013 at 8:55 PM, Lance Java <lance.j...@googlemail.com>wrote: > I do this > > http://stackoverflow.com/questions/15664815/how-to-test-dao-layer-in-tapestry-dependent-projects/15671034#15671034 > > > On 22 September 2013 19:16, Boris Horvat <horvat.z.bo...@gmail.com> wrote: > > > Hi all, > > > > How does one make a proper testing of the business layer in tapestry > that I > > inject into the page as a service? Is there anything specific that one > > needs to look out for? > > > > Should I simple do something like > > > > 1) Create an object of the BU layer > > 2) Mock hibernate with some in-memory db > > 3) Call methods of the BU layer > > 4) Verify the results > > > > Any test example that I can check out? Any projects with a nice testing > > environments that one can recommend? > > > > Thanks > > > > -- > > Sincerely > > *Boris Horvat* > > > -- Sincerely *Boris Horvat*