You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2013/11/23 19:11:00 UTC

svn commit: r1544854 - in /myfaces/core/trunk/impl: ./ src/test/java/org/apache/myfaces/application/flow/ src/test/java/org/apache/myfaces/mc/test/core/ src/test/resources/META-INF/

Author: lu4242
Date: Sat Nov 23 18:11:00 2013
New Revision: 1544854

URL: http://svn.apache.org/r1544854
Log:
MYFACES-3826 - Add junit test case for MyFaces and CDI

Added:
    myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow1Bean.java   (with props)
    myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow21Bean.java   (with props)
    myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow2Bean.java   (with props)
    myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesCDIRequestTestCase.java   (with props)
    myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesCDIRequestTestCase.java   (with props)
    myfaces/core/trunk/impl/src/test/resources/META-INF/beans.xml   (with props)
Modified:
    myfaces/core/trunk/impl/pom.xml

Modified: myfaces/core/trunk/impl/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/pom.xml?rev=1544854&r1=1544853&r2=1544854&view=diff
==============================================================================
--- myfaces/core/trunk/impl/pom.xml (original)
+++ myfaces/core/trunk/impl/pom.xml Sat Nov 23 18:11:00 2013
@@ -40,6 +40,10 @@
         <url>http://svn.apache.org/repos/asf/myfaces/core/trunk/impl</url>
     </scm>
     
+    <properties>
+        <openwebbeans.version>1.2.1</openwebbeans.version>
+    </properties>
+    
     <build>
         
         <resources>
@@ -1179,6 +1183,49 @@
             <artifactId>jasper-el</artifactId>
         </dependency>
 
+        <!-- Openwebbeans for CDI Test -->
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-interceptor_1.1_spec</artifactId>
+            <version>1.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-impl</artifactId>
+            <version>${openwebbeans.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-jsf</artifactId>
+            <version>${openwebbeans.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-web</artifactId>
+            <version>${openwebbeans.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-spi</artifactId>
+            <version>${openwebbeans.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-resource</artifactId>
+            <version>${openwebbeans.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-clustering</artifactId>
+            <version>${openwebbeans.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
     
 

Added: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow1Bean.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow1Bean.java?rev=1544854&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow1Bean.java (added)
+++ myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow1Bean.java Sat Nov 23 18:11:00 2013
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.application.flow;
+
+import java.io.Serializable;
+import javax.annotation.PostConstruct;
+import javax.faces.flow.FlowScoped;
+import javax.inject.Named;
+
+/**
+ *
+ */
+@Named
+@FlowScoped("flow1")
+public class Flow1Bean implements Serializable
+{
+    private String postConstructCalled;
+    
+    private String name;
+    
+    @PostConstruct
+    public void init()
+    {
+        postConstructCalled = "true";
+    }
+
+    public String getPostConstructCalled()
+    {
+        return postConstructCalled;
+    }
+
+    public void setPostConstructCalled(String postConstructCalled)
+    {
+        this.postConstructCalled = postConstructCalled;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+}

Propchange: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow1Bean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow21Bean.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow21Bean.java?rev=1544854&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow21Bean.java (added)
+++ myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow21Bean.java Sat Nov 23 18:11:00 2013
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.application.flow;
+
+import java.io.Serializable;
+import javax.annotation.PostConstruct;
+import javax.faces.flow.FlowScoped;
+import javax.inject.Inject;
+import javax.inject.Named;
+
+/**
+ *
+ */
+@Named
+@FlowScoped(value="flow2", definingDocumentId="flow_def_1")
+public class Flow21Bean implements Serializable
+{
+    private String postConstructCalled;
+    
+    private String name;
+    
+    @Inject
+    private Flow1Bean flow1Bean;
+    
+    @PostConstruct
+    public void init()
+    {
+        postConstructCalled = "true";
+    }
+
+    public String getPostConstructCalled()
+    {
+        return postConstructCalled;
+    }
+
+    public void setPostConstructCalled(String postConstructCalled)
+    {
+        this.postConstructCalled = postConstructCalled;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    public Flow1Bean getFlow1Bean()
+    {
+        return flow1Bean;
+    }
+
+    public void setFlow1Bean(Flow1Bean flow1Bean)
+    {
+        this.flow1Bean = flow1Bean;
+    }
+}

Propchange: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow21Bean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow2Bean.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow2Bean.java?rev=1544854&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow2Bean.java (added)
+++ myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow2Bean.java Sat Nov 23 18:11:00 2013
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.application.flow;
+
+import java.io.Serializable;
+import javax.annotation.PostConstruct;
+import javax.faces.flow.FlowScoped;
+import javax.inject.Named;
+
+/**
+ *
+ */
+@Named
+@FlowScoped(value="flow2", definingDocumentId="flow_def_1")
+public class Flow2Bean implements Serializable
+{
+    private String postConstructCalled;
+    
+    private String name;
+    
+    @PostConstruct
+    public void init()
+    {
+        postConstructCalled = "true";
+    }
+
+    public String getPostConstructCalled()
+    {
+        return postConstructCalled;
+    }
+
+    public void setPostConstructCalled(String postConstructCalled)
+    {
+        this.postConstructCalled = postConstructCalled;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+}

Propchange: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/Flow2Bean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesCDIRequestTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesCDIRequestTestCase.java?rev=1544854&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesCDIRequestTestCase.java (added)
+++ myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesCDIRequestTestCase.java Sat Nov 23 18:11:00 2013
@@ -0,0 +1,215 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.application.flow;
+
+import javax.el.ExpressionFactory;
+import javax.enterprise.context.ContextNotActiveException;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.faces.application.ConfigurableNavigationHandler;
+import javax.faces.application.NavigationCase;
+import javax.faces.application.StateManager;
+import javax.faces.component.UICommand;
+import javax.faces.flow.Flow;
+import javax.faces.flow.FlowHandler;
+import javax.faces.render.ResponseStateManager;
+import org.apache.myfaces.cdi.util.CDIUtils;
+import org.apache.myfaces.mc.test.core.AbstractMyFacesCDIRequestTestCase;
+import org.apache.myfaces.shared.config.MyfacesConfig;
+import org.junit.Test;
+import org.testng.Assert;
+
+/**
+ * This test is the same as FlowMyFacesRequestTestCase with the diference that
+ * in this case CDI is enabled and the other alternative is used.
+ */
+public class FlowMyFacesCDIRequestTestCase extends AbstractMyFacesCDIRequestTestCase
+{
+
+    @Override
+    protected boolean isScanAnnotations()
+    {
+        return true;
+    }
+
+    @Override
+    protected void setUpWebConfigParams() throws Exception
+    {
+        super.setUpWebConfigParams();
+        servletContext.addInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES","org.apache.myfaces.application.flow");
+        servletContext.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_CLIENT);
+        servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
+        servletContext.addInitParameter(MyfacesConfig.INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS, "auto");
+        servletContext.addInitParameter("javax.faces.CONFIG_FILES", "/WEB-INF/flow1-flow.xml");
+        servletContext.addInitParameter("javax.faces.CLIENT_WINDOW_MODE", "url");
+    }
+    
+    @Test
+    public void testFlow1_1() throws Exception
+    {
+        setupRequest("/flow1_1.xhtml");
+        processLifecycleExecute();
+        
+        ConfigurableNavigationHandler handler = (ConfigurableNavigationHandler) facesContext.getApplication().getNavigationHandler();
+        
+        NavigationCase navCase = handler.getNavigationCase(facesContext, null, "flow1");
+        
+        Assert.assertNotNull(navCase);
+        
+        NavigationCase contentCase = handler.getNavigationCase(facesContext, null, "flow1_content");
+        
+        Assert.assertNull(contentCase);
+        
+        // Check begin view node
+        Assert.assertEquals("/flow1/begin.xhtml", navCase.getToViewId(facesContext));
+        
+        processRender();
+       
+        //Enter flow 1
+        UICommand button = (UICommand) facesContext.getViewRoot().findComponent("mainForm:startFlow1");
+        submit(button);
+        
+        processLifecycleExecute();
+        
+        Flow currentFlow = facesContext.getApplication().getFlowHandler().getCurrentFlow(facesContext);
+        Assert.assertNotNull(currentFlow);
+        
+        // Check Flow1Bean can be created
+        Flow1Bean bean1 = facesContext.getApplication().evaluateExpressionGet(
+            facesContext, "#{flow1Bean}", Flow1Bean.class);
+        Assert.assertNotNull(bean1);
+        Assert.assertEquals(bean1.getPostConstructCalled(), "true");
+        
+        contentCase = handler.getNavigationCase(facesContext, null, "flow1_content");
+        
+        Assert.assertNotNull(contentCase);
+    }
+    
+    @Test
+    public void testFlow1_2() throws Exception
+    {
+        setupRequest("/flow1_2.xhtml");
+        processLifecycleExecute();
+        
+        ConfigurableNavigationHandler handler = (ConfigurableNavigationHandler) facesContext.getApplication().getNavigationHandler();
+        
+        NavigationCase navCase = handler.getNavigationCase(facesContext, null, "flow1");
+        
+        Assert.assertNotNull(navCase);
+        
+        NavigationCase contentCase = handler.getNavigationCase(facesContext, null, "flow1_content");
+        
+        Assert.assertNull(contentCase);
+        
+        // Check begin view node
+        Assert.assertEquals("/flow1/begin.xhtml", navCase.getToViewId(facesContext));
+        
+        processRender();
+       
+        //Enter flow 1
+        UICommand button = (UICommand) facesContext.getViewRoot().findComponent("mainForm:startFlow1");
+        submit(button);
+        
+        processLifecycleExecute();
+        
+        Flow currentFlow = facesContext.getApplication().getFlowHandler().getCurrentFlow(facesContext);
+        Assert.assertNotNull(currentFlow);
+        Assert.assertEquals("flow1", currentFlow.getId());
+        
+        facesContext.getApplication().getFlowHandler().getCurrentFlowScope().put("flow1","value1");
+        
+        // Check the bean with @FlowScoped annotation can be instantiated
+        Flow1Bean bean1 = facesContext.getApplication().evaluateExpressionGet(
+            facesContext, "#{flow1Bean}", Flow1Bean.class);
+        Assert.assertNotNull(bean1);
+        Assert.assertEquals(bean1.getPostConstructCalled(), "true");        
+        bean1.setName("John");
+        
+        processRender();
+        
+        UICommand button2 = (UICommand) facesContext.getViewRoot().findComponent("mainForm:call_flow2");
+        submit(button2);
+        
+        processLifecycleExecute();
+        
+        currentFlow = facesContext.getApplication().getFlowHandler().getCurrentFlow(facesContext);
+        Assert.assertNotNull(currentFlow);
+        Assert.assertEquals("flow2", currentFlow.getId());
+        Assert.assertFalse(facesContext.getApplication().getFlowHandler().getCurrentFlowScope().containsKey("flow1"));
+        facesContext.getApplication().getFlowHandler().getCurrentFlowScope().put("flow2","value2");
+        
+        Flow2Bean bean2 = facesContext.getApplication().evaluateExpressionGet(
+            facesContext, "#{flow2Bean}", Flow2Bean.class);
+        Assert.assertNotNull(bean2);
+        Assert.assertEquals(bean2.getPostConstructCalled(), "true");
+        
+        Flow1Bean bean1_1 = facesContext.getApplication().evaluateExpressionGet(
+            facesContext, "#{flow1Bean}", Flow1Bean.class);
+        Assert.assertEquals(bean1_1.getName(), "John");
+        
+        Flow21Bean bean2_1 = facesContext.getApplication().evaluateExpressionGet(
+            facesContext, "#{flow21Bean}", Flow21Bean.class);
+        Assert.assertNotNull(bean2_1);
+        Assert.assertEquals(bean2_1.getPostConstructCalled(), "true");
+        Assert.assertNotNull(bean2_1.getFlow1Bean());
+
+        processRender();
+        
+        //Check current view is the begin of flow2
+        Assert.assertEquals("/flow2/begin.xhtml", facesContext.getViewRoot().getViewId());
+        
+        UICommand button3 = (UICommand) facesContext.getViewRoot().findComponent("mainForm:content");
+        submit(button3);
+        processLifecycleExecute();
+        processRender();
+        
+        currentFlow = facesContext.getApplication().getFlowHandler().getCurrentFlow(facesContext);
+        Assert.assertNotNull(currentFlow);
+        Assert.assertEquals("flow2", currentFlow.getId());
+
+        NavigationCase endCase = handler.getNavigationCase(facesContext, null, "end");
+        Assert.assertNotNull(endCase);
+        
+        UICommand button4 = (UICommand) facesContext.getViewRoot().findComponent("mainForm:end_flow");
+        submit(button4);
+        
+        processLifecycleExecute();
+        
+        // The interesting thing here is that it requires to get out from two consecutive flows, and it needs
+        // to chain all commands. The difficulty here resides in the context should be resolved properly, and
+        // there are a couple of recursive calls that needs to be solved.
+        currentFlow = facesContext.getApplication().getFlowHandler().getCurrentFlow(facesContext);
+        Assert.assertNull(currentFlow);
+        Assert.assertEquals("/flow1_end.xhtml", facesContext.getViewRoot().getViewId());
+        
+        try
+        {
+            Flow1Bean bean1_2 = facesContext.getApplication().evaluateExpressionGet(
+                facesContext, "#{flow1Bean}", Flow1Bean.class);
+            bean1_2.getName();
+            Assert.fail("Invocation show throw NullPointerException or ContextNotActiveException");
+        }
+        catch (ContextNotActiveException e)
+        {
+        }
+        catch (NullPointerException e)
+        {
+        }
+    }
+
+}

Propchange: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/application/flow/FlowMyFacesCDIRequestTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesCDIRequestTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesCDIRequestTestCase.java?rev=1544854&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesCDIRequestTestCase.java (added)
+++ myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesCDIRequestTestCase.java Sat Nov 23 18:11:00 2013
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.mc.test.core;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletRequestEvent;
+import javax.servlet.http.HttpSessionEvent;
+import org.apache.myfaces.spi.impl.CDIAnnotationDelegateInjectionProvider;
+import org.apache.webbeans.servlet.WebBeansConfigurationListener;
+
+/**
+ *
+ */
+public class AbstractMyFacesCDIRequestTestCase extends AbstractMyFacesRequestTestCase
+{
+    
+    private WebBeansConfigurationListener owbListener;
+
+    protected void setUpWebConfigParams() throws Exception
+    {
+        super.setUpWebConfigParams();
+        servletContext.addInitParameter("org.apache.myfaces.spi.InjectionProvider", 
+            CDIAnnotationDelegateInjectionProvider.class.getName());
+   }
+    
+    @Override
+    protected void setUpServletListeners() throws Exception
+    {
+        owbListener = new WebBeansConfigurationListener();
+        owbListener.contextInitialized(new ServletContextEvent(servletContext));
+        super.setUpServletListeners();
+    }
+
+    @Override
+    protected void tearDownServletListeners() throws Exception
+    {
+        super.tearDownServletListeners();
+        owbListener.contextDestroyed(new ServletContextEvent(servletContext));
+    }
+
+    @Override
+    protected void setupRequest(String pathInfo, String query) throws Exception
+    {
+        owbListener.requestInitialized(new ServletRequestEvent(servletContext, request));
+        super.setupRequest(pathInfo, query);
+        owbListener.sessionCreated(new HttpSessionEvent(session));
+    }
+
+    @Override
+    protected void tearDownRequest()
+    {
+        super.tearDownRequest();
+        owbListener.requestDestroyed(new ServletRequestEvent(servletContext, request));
+    }
+
+}

Propchange: myfaces/core/trunk/impl/src/test/java/org/apache/myfaces/mc/test/core/AbstractMyFacesCDIRequestTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: myfaces/core/trunk/impl/src/test/resources/META-INF/beans.xml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/test/resources/META-INF/beans.xml?rev=1544854&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/test/resources/META-INF/beans.xml (added)
+++ myfaces/core/trunk/impl/src/test/resources/META-INF/beans.xml Sat Nov 23 18:11:00 2013
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<beans/>
+

Propchange: myfaces/core/trunk/impl/src/test/resources/META-INF/beans.xml
------------------------------------------------------------------------------
    svn:eol-style = native