NHibernate.Test.Criteria.CriteriaQueryTest.DetachedCriteriaInspection test improvement

8 views
Skip to first unread message

Darius Damalakas

unread,
Jun 26, 2009, 9:38:12 AM6/26/09
to nhusers
Hi, I am having some troubles with DetachedCriteria and
GetCriteriaByAlias method. This method always returns a new
DetachedCriteria, unlike CriteriaImpl class, which returns the same
SubCriteria.

To be more specific, here is what i mean in code:

in CriteriaQueryTest.cs:1536. there is a line that tests this:
Assert.AreEqual(criteria.CreateCriteria("fooBar"),
criteria.GetCriteriaByPath("fooBar"));

I would expect to see the same line in test
DetachedCriteriaInspection. My initial guess is that this line will
break the tests, since by looking at the implementation
DetachedCriteria.cs:217, each time a new Detached Criteria is
returned:
return new DetachedCriteria(impl, tmpCrit);


Line information is for revision 4532


Could some please add these lines and run the tests?
I would really like to know if it's my mistake, or a bug in NHIbernate
(which obstructs me to do some nice-features).

Tuna Toksoz

unread,
Jun 26, 2009, 9:49:37 AM6/26/09
to nhu...@googlegroups.com
It looks like a bug.

Tuna Toksöz
Eternal sunshine of the open source mind.

http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
http://twitter.com/tehlike
Reply all
Reply to author
Forward
0 new messages