You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhusers
Hi guys,
I have a builder that builds a ICriteria based on filtering options
the users select in the UI. Is it possible to test this in a
disconnected way, without requiring a session? How can I instantiate a
new ICriterai? Currently there is no test coverage in this area and it
is unfortunately a bug magnet. I would be really helpful if I could
increase coverage in this area to ensure the filtering/sorting options
users pick are accurately reflected in the criterias we build in the
back end, but I'm a little stuck on how to instantiate/manipulate
disconnected ICriteria. Is this even possible? If not is there an
alternative approach I might consider?
Thanks!
Matei
sbohlen
unread,
Jun 17, 2011, 1:14:38 PM6/17/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhu...@googlegroups.com
Try it with DetachedCriteria instead. If you're dynamically building up a criteria in one place then executing it later (elsewhere), you should probably be leveraging DetachedCriteria anyway to avoid classes in your project being 'session-aware' than really should/need be. Your build-up-criteria-dynamically-based-on-user-input is probably (one of) the canonical use-case for DetachedCriteria anyway.
-Steve B.
Nexus
unread,
Jun 27, 2011, 6:45:01 AM6/27/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhusers
Why don't you test it integrated, with a database, or SQLite of you
prefer ?