Leonardo Uribe created MYFACES-3862:
---------------------------------------

             Summary: Set mock InitialContextFactory for junit testing with 
myfaces impl test
                 Key: MYFACES-3862
                 URL: https://issues.apache.org/jira/browse/MYFACES-3862
             Project: MyFaces Core
          Issue Type: Improvement
          Components: JSR-344
            Reporter: Leonardo Uribe
            Assignee: Leonardo Uribe


Trying some examples I have notice the code we have in the new impl-test module 
does not initialize a default InitialContextFactory by default. The effect is 
some calls to new InitialContext() does not work as in the web server. 

The idea is provide a custom InitialContextFactory implementation that creates 
and mock initial context, so for example when CDI set the BeanManager, it can 
be grabbed from the context.

It could be good to provide an annotation to set the JNDI mapping for the test 
enviroment too, so you can inject for example a datasource and so on.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to