[
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-364?pag...
]
Emmanuel Bernard commented on HSEARCH-364:
------------------------------------------
Thinking this through
We could create two interfaces
interface FullTextService {
FullTextSession getFullTextSession(Session session);
}
interface FullTextService {
FullTextEntityManager getFullEntityManager(EntityManager em);
}
with the default impl being
class DefaultFullTextService {
FullTextSession getFullTextSession(Session session) {
return Search.getFullTextSession(session);
}
}
and someone could write an impl to mock the generation of FTSession or FTEM.
But that looks quite simple, should we really add that to Hibernate Search? Esp with
JSR-299 and the like, providing a FullTextSession injection is trivial.
Make Hibernate Search fully mockable
------------------------------------
Key: HSEARCH-364
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-364
Project: Hibernate Search
Issue Type: Improvement
Reporter: Emmanuel Bernard
Fix For: 3.2.0
Today Search.getFullTextEntityManager(em) is a static ref that cannot be mocked/
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira