Hello everyone, What are the best options to test Finder pattern by Ayende (http:// ayende.com/Blog/archive/2006/12/07/ ComplexSearchingQueryingWithNHibernate.aspx)? I've been using this pattern in the projects, that almost had no unit tests, and now after some investigation it turned out that to test such code is not a piece of cake. Neither DetachedCriteria nor ICriteria do not provide public interface for getting Criterions \ Restrictions, that were set in the Add method. After some discussions within a team we see 2 not cool options: 1. Provide ISession mock to GetExecutableCriteria method, cast ICriteria to CriteriaImpl and assert it 2. Make kind of integration tests and run the query against the test database, with pre-created test data.
Are we missing something? What are the best practices for such case? Thanks in advance! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
