Java Mailing List Archive

http://www.gg3721.com/

Home » the NHibernate development list »

[NHibernate-development] Event configuration Unit Test patch

Kailuo Wang

2008-04-22

Replies: Find Java Web Hosting

Author LoginPost Reply
I created a simple Unit test in NHibernate.Tests
which helps me figured out that the way NHibernate config event is a tiny bit strange (only to me)....

It recognizes
<listener class='NHibernate.Test.Event.TestPostInsertEventListener,NHibernate.Test' type='post-insert' />

It also tries to recognize the Hibernate way
<event type="post-insert"/>
<listener class="
NHibernate.Test.Event.TestPostInsertEventListener,NHibernate.Test" type="post-insert" />
</event>
However, as you might already noticed on the above code, NHibernate still requires the type attribute in the listener tag.
anyway, I don't think this is a big deal though. The attached is a patch with minor unit test about this configuration. I posted it here just in case anyone think it might be helpful.



                       

Attachment: NHibernate-Minor-EventListenerTest.patch (zipped)
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Nhibernate-development mailing list
Nhibernate-development@(protected)
https://lists.sourceforge.net/lists/listinfo/nhibernate-development
©2008 gg3721.com - Jax Systems, LLC, U.S.A.