[webbeans-commits] Webbeans SVN: r3309 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-28 05:12:16 -0400 (Tue, 28 Jul 2009)
New Revision: 3309
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java
Log:
Link tests to JIRA
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java 2009-07-28 09:08:42 UTC (rev 3308)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java 2009-07-28 09:12:16 UTC (rev 3309)
@@ -40,6 +40,7 @@
{
@Test(groups = { "ri-broken", "el" } )
@SpecAssertion(section = "5.8", id = "aaa")
+ //WBRI-322
public void testELResolverRegisteredWithJsf() throws Exception
{
WebClient webclient = new WebClient();
@@ -49,6 +50,7 @@
@Test(groups = { "ri-broken", "el" } )
@SpecAssertion(section = "5.8", id = "aba")
+ //WBRI-322
public void testELResolverRegisteredWithServletContainer() throws Exception
{
WebClient webclient = new WebClient();
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3308 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection: non/contextual and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-28 05:08:42 -0400 (Tue, 28 Jul 2009)
New Revision: 3308
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/SessionBeanInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java
Log:
Link tests to JIRA
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/SessionBeanInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/SessionBeanInjectionTest.java 2009-07-28 08:31:29 UTC (rev 3307)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/SessionBeanInjectionTest.java 2009-07-28 09:08:42 UTC (rev 3308)
@@ -53,6 +53,7 @@
@Test(groups = "ri-broken")
@SpecAssertion(section = "5.6", id = "e")
+ //JBAS-7046
public void testInjectionOnEJBInterceptor()
{
// Test interceptor that intercepts contextual Session Bean
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java 2009-07-28 08:31:29 UTC (rev 3307)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java 2009-07-28 09:08:42 UTC (rev 3308)
@@ -45,6 +45,7 @@
@SpecAssertions( {
@SpecAssertion(section = "5.6", id = "e"),
@SpecAssertion(section = "5.6.4", id = "a") })
+ //JBAS-7046
public void testInjectionIntoServlet() throws Exception
{
WebClient webClient = new WebClient();
@@ -56,6 +57,7 @@
@SpecAssertions( {
@SpecAssertion(section = "5.6", id = "e"),
@SpecAssertion(section = "5.6.4", id = "a") })
+ //JBAS-7046
public void testInjectionIntoFilter() throws Exception
{
WebClient webClient = new WebClient();
@@ -65,6 +67,7 @@
@Test(groups = "ri-broken")
@SpecAssertion(section = "5.6", id = "e")
+ //JBAS-7046
public void testInjectionIntoServletListener() throws Exception
{
WebClient webClient = new WebClient();
@@ -74,6 +77,7 @@
@Test(groups = "ri-broken")
@SpecAssertion(section = "5.6", id = "e")
+ //JBAS-7046
public void testInjectionIntoTagHandler() throws Exception
{
WebClient webClient = new WebClient();
@@ -85,6 +89,7 @@
@Test(groups = "ri-broken")
@SpecAssertion(section = "5.6", id = "e")
+ //JBAS-7046
public void testInjectionIntoTagLibraryListener() throws Exception
{
WebClient webClient = new WebClient();
@@ -94,6 +99,7 @@
@Test(groups = "ri-broken")
@SpecAssertion(section = "5.6", id = "d")
+ //JBAS-7046
public void testInjectionIntoJSFManagedBean() throws Exception
{
WebClient webclient = new WebClient();
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3307 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-28 04:31:29 -0400 (Tue, 28 Jul 2009)
New Revision: 3307
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/Salmon.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java
Log:
Tests for Unified EL integration
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java 2009-07-28 08:01:35 UTC (rev 3306)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java 2009-07-28 08:31:29 UTC (rev 3307)
@@ -1,3 +1,19 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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.jboss.jsr299.tck.tests.lookup.el;
import javax.enterprise.context.Conversation;
@@ -17,7 +33,7 @@
public class ResolutionByNameTest extends AbstractJSR299Test
{
- @Test
+ @Test(groups="rewrite")
@SpecAssertions({
@SpecAssertion(section="5.8", id="c"),
@SpecAssertion(section="2.5", id="a")
@@ -29,10 +45,7 @@
}
@Test(groups = "beanLifecycle")
- @SpecAssertions({
- @SpecAssertion(section = "5.8", id = "bc"),
- @SpecAssertion(section = "6.5.2", id = "a")
- })
+ @SpecAssertion(section = "6.5.2", id = "a")
public void testContextCreatesNewInstanceForInjection()
{
Context requestContext = getCurrentManager().getContext(RequestScoped.class);
@@ -41,5 +54,18 @@
TunaFarm tunaFarm = getCurrentConfiguration().getEl().evaluateValueExpression("#{tunaFarm}", TunaFarm.class);
assert tunaFarm.tuna != null;
}
+
+ @Test(groups="el")
+ @SpecAssertion(section="5.8", id="bb")
+ public void testUnresolvedNameReturnsNull() {
+ assert getCurrentConfiguration().getEl().evaluateValueExpression("#{nonExistingTuna}", Tuna.class) == null;
+ }
+ @Test(groups = "el")
+ @SpecAssertion(section="5.8", id="bc")
+ public void testELResolverReturnsContextualInstance() {
+ Salmon salmon = getInstanceByType(Salmon.class);
+ salmon.setAge(3);
+ assert getCurrentConfiguration().getEl().evaluateValueExpression("#{salmon}", Salmon.class).getAge() == 3;
+ }
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/Salmon.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/Salmon.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/Salmon.java 2009-07-28 08:31:29 UTC (rev 3307)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.lookup.el;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Named;
+
+@Named
+@RequestScoped
+class Salmon
+{
+ private int age = 0;
+
+ public int getAge()
+ {
+ return age;
+ }
+
+ public void setAge(int age)
+ {
+ this.age = age;
+ }
+}
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3306 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-28 04:01:35 -0400 (Tue, 28 Jul 2009)
New Revision: 3306
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java
Log:
Fixed spec version
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java 2009-07-28 07:55:07 UTC (rev 3305)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java 2009-07-28 08:01:35 UTC (rev 3306)
@@ -35,7 +35,7 @@
@Resource(destination = "WEB-INF/faces-config.xml", source = "faces-config.xml"),
@Resource(destination = "JSFTestPage.jsp", source = "JSFTestPage.jsp"),
@Resource(destination = "JSPTestPage.jsp", source = "JSPTestPage.jsp")})
-@SpecVersion("2009625")
+@SpecVersion("20090625")
public class IntegrationWithUnifiedELTest extends AbstractJSR299Test
{
@Test(groups = { "ri-broken", "el" } )
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3305 - in tck/trunk: impl and 6 other directories.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-28 03:55:07 -0400 (Tue, 28 Jul 2009)
New Revision: 3305
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Farm.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Sheep.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TagLibraryListener.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestFilter.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestListener.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestServlet.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestTagHandler.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ManagedBeanTestPage.jsp
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TagPage.jsp
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestLibrary.tld
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/faces-config.xml
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/web.xml
Modified:
tck/trunk/impl/pom.xml
tck/trunk/pom.xml
Log:
Added tests for dependency injection with non contextual instances
Modified: tck/trunk/impl/pom.xml
===================================================================
--- tck/trunk/impl/pom.xml 2009-07-28 07:48:40 UTC (rev 3304)
+++ tck/trunk/impl/pom.xml 2009-07-28 07:55:07 UTC (rev 3305)
@@ -37,6 +37,11 @@
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ </dependency>
<dependency>
<groupId>javax.transaction</groupId>
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Farm.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Farm.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Farm.java 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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.jboss.jsr299.tck.tests.lookup.injection.non.contextual;
+
+import javax.enterprise.inject.Current;
+
+public class Farm
+{
+ @Current
+ private Sheep sheep;
+
+ public boolean isSheepInjected() {
+ return sheep != null;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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.jboss.jsr299.tck.tests.lookup.injection.non.contextual;
+
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecAssertions;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.testng.annotations.Test;
+
+import com.gargoylesoftware.htmlunit.WebClient;
+import com.gargoylesoftware.htmlunit.WebResponse;
+
+@Artifact
+@IntegrationTest(runLocally = true)
+@Resources( {
+ @Resource(destination = WarArtifactDescriptor.WEB_XML_DESTINATION, source = "web.xml"),
+ @Resource(destination = "WEB-INF/faces-config.xml", source = "faces-config.xml"),
+ @Resource(destination = "WEB-INF/TestLibrary.tld", source = "TestLibrary.tld"),
+ @Resource(destination = "TagPage.jsp", source = "TagPage.jsp"),
+ @Resource(destination = "ManagedBeanTestPage.jsp", source = "ManagedBeanTestPage.jsp")})
+@SpecVersion("20090625")
+public class InjectionIntoNonContextualComponentTest extends AbstractJSR299Test
+{
+ @Test(groups = "ri-broken")
+ @SpecAssertions( {
+ @SpecAssertion(section = "5.6", id = "e"),
+ @SpecAssertion(section = "5.6.4", id = "a") })
+ public void testInjectionIntoServlet() throws Exception
+ {
+ WebClient webClient = new WebClient();
+ webClient.setThrowExceptionOnFailingStatusCode(true);
+ webClient.getPage(getContextPath() + "Test/Servlet");
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertions( {
+ @SpecAssertion(section = "5.6", id = "e"),
+ @SpecAssertion(section = "5.6.4", id = "a") })
+ public void testInjectionIntoFilter() throws Exception
+ {
+ WebClient webClient = new WebClient();
+ webClient.setThrowExceptionOnFailingStatusCode(true);
+ webClient.getPage(getContextPath() + "TestFilter");
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "5.6", id = "e")
+ public void testInjectionIntoServletListener() throws Exception
+ {
+ WebClient webClient = new WebClient();
+ webClient.setThrowExceptionOnFailingStatusCode(true);
+ webClient.getPage(getContextPath() + "Test/ServletListener");
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "5.6", id = "e")
+ public void testInjectionIntoTagHandler() throws Exception
+ {
+ WebClient webClient = new WebClient();
+ webClient.setThrowExceptionOnFailingStatusCode(false);
+ WebResponse response = webClient.getPage(getContextPath() + "TagPage.jsp").getWebResponse();
+ assert response.getStatusCode() == 200;
+ assert response.getContentAsString().contains(TestTagHandler.SUCCESS);
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "5.6", id = "e")
+ public void testInjectionIntoTagLibraryListener() throws Exception
+ {
+ WebClient webClient = new WebClient();
+ webClient.setThrowExceptionOnFailingStatusCode(true);
+ webClient.getPage(getContextPath() + "Test/TagLibraryListener");
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "5.6", id = "d")
+ public void testInjectionIntoJSFManagedBean() throws Exception
+ {
+ WebClient webclient = new WebClient();
+ webclient.setThrowExceptionOnFailingStatusCode(true);
+ String content = webclient.getPage(getContextPath() + "ManagedBeanTestPage.jsf").getWebResponse().getContentAsString();
+ assert content.contains("It works");
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Sheep.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Sheep.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/Sheep.java 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.non.contextual;
+
+public class Sheep
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TagLibraryListener.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TagLibraryListener.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TagLibraryListener.java 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.non.contextual;
+
+import javax.enterprise.inject.Current;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+public class TagLibraryListener implements ServletContextListener
+{
+ @Current
+ private Sheep sheep;
+
+ public void contextDestroyed(ServletContextEvent sce)
+ {
+ }
+
+ public void contextInitialized(ServletContextEvent sce)
+ {
+ sce.getServletContext().setAttribute("tag.library.listener.injected", sheep != null);
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestFilter.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestFilter.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestFilter.java 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,35 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.non.contextual;
+
+import java.io.IOException;
+
+import javax.enterprise.inject.Current;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletResponse;
+
+public class TestFilter implements Filter
+{
+
+ @Current
+ private Sheep sheep;
+ private boolean injectionPerformedCorrectly = false;
+
+ public void destroy()
+ {
+ }
+
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
+ {
+ HttpServletResponse resp = (HttpServletResponse) response;
+ resp.setStatus(injectionPerformedCorrectly ? 200 : 500);
+ }
+
+ public void init(FilterConfig filterConfig) throws ServletException
+ {
+ injectionPerformedCorrectly = sheep != null;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestListener.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestListener.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestListener.java 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.non.contextual;
+
+import javax.enterprise.inject.Current;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+public class TestListener implements ServletContextListener
+{
+ @Current
+ private Sheep sheep;
+
+ public void contextDestroyed(ServletContextEvent sce)
+ {
+ }
+
+ public void contextInitialized(ServletContextEvent sce)
+ {
+ sce.getServletContext().setAttribute("listener.injected", sheep != null);
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestServlet.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestServlet.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestServlet.java 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,62 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.non.contextual;
+
+import java.io.IOException;
+
+import javax.enterprise.inject.Current;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class TestServlet extends HttpServlet
+{
+ @Current
+ private Sheep sheep;
+ private boolean injectionPerformedCorrectly = false;
+
+ private static final long serialVersionUID = -7672096092047821010L;
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
+ {
+ if (req.getRequestURI().endsWith("Servlet")) {
+ testServlet(req, resp);
+ } else if (req.getRequestURI().endsWith("ServletListener")) {
+ testListener(req, resp);
+ } else if (req.getRequestURI().endsWith("TagLibraryListener")) {
+ testTagLibraryListener(req, resp);
+ } else {
+ resp.setStatus(404);
+ }
+ }
+
+ private void testServlet(HttpServletRequest req, HttpServletResponse resp) {
+ // Return 200 if injection into Servlet occurred, 500 otherwise
+ resp.setStatus(injectionPerformedCorrectly ? 200 : 500);
+ }
+
+ private void testListener(HttpServletRequest req, HttpServletResponse resp) {
+ // Return 200 if injection into Listener occurred, 500 otherwise
+ boolean result = (Boolean) req.getSession().getServletContext().getAttribute("listener.injected");
+ resp.setStatus((result) ? 200 : 500);
+ }
+
+ private void testTagLibraryListener(HttpServletRequest req, HttpServletResponse resp) {
+ // Return 200 if injection into TagLibrary Listener occurred, 500 otherwise
+ boolean result = (Boolean) req.getSession().getServletContext().getAttribute("tag.library.listener.injected");
+ resp.setStatus((result) ? 200 : 500);
+ }
+
+ @Override
+ public void init() throws ServletException
+ {
+ injectionPerformedCorrectly = sheep != null;
+ }
+
+ @Override
+ public void init(ServletConfig config) throws ServletException
+ {
+ init();
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestTagHandler.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestTagHandler.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestTagHandler.java 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,30 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.non.contextual;
+
+import java.io.IOException;
+
+import javax.enterprise.inject.Current;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.SimpleTagSupport;
+
+public class TestTagHandler extends SimpleTagSupport
+{
+ private static final long serialVersionUID = -3048065065359948044L;
+ public static final String SUCCESS = "It works.";
+ public static final String FAILURE = "It is broken.";
+
+ @Current
+ private Sheep sheep;
+
+ @Override
+ public void doTag() throws JspException, IOException
+ {
+ if (sheep == null)
+ {
+ getJspContext().getOut().write(FAILURE);
+ }
+ else
+ {
+ getJspContext().getOut().write(SUCCESS);
+ }
+ }
+}
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ManagedBeanTestPage.jsp
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ManagedBeanTestPage.jsp (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ManagedBeanTestPage.jsp 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,14 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+ <head>
+ <title>Managed Bean Test Page</title>
+ </head>
+ <body>
+ <f:view>
+ <h1>
+ <h:outputText value="#{farm.sheepInjected ? 'It works' : 'It is broken'}"/>
+ </h1>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TagPage.jsp
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TagPage.jsp (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TagPage.jsp 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,4 @@
+<%@ page language="java" contentType="text/plain; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<%@ taglib uri="http://contextual.non.injection.lookup.tests.tck.jsr299.jboss.org/" prefix="t" %>
+<t:tag/>
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestLibrary.tld
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestLibrary.tld (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/TestLibrary.tld 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,14 @@
+<taglib>
+ <tlib-version>1.0</tlib-version>
+ <short-name>test-library</short-name>
+ <uri>http://contextual.non.injection.lookup.tests.tck.jsr299.jboss.org/</uri>
+ <jspversion>2.1</jspversion>
+<tag>
+ <name>tag</name>
+ <tag-class>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.TestTagHandler</tag-class>
+ <body-content>empty</body-content>
+</tag>
+<listener>
+ <listener-class>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.TagLibraryListener</listener-class>
+</listener>
+</taglib>
\ No newline at end of file
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/faces-config.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/faces-config.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/faces-config.xml 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
+ <managed-bean>
+ <managed-bean-name>farm</managed-bean-name>
+ <managed-bean-class>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.Farm</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+</faces-config>
\ No newline at end of file
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/web.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/web.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/web.xml 2009-07-28 07:55:07 UTC (rev 3305)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <display-name>Dependency Injection Test</display-name>
+ <listener>
+ <listener-class>org.jboss.testharness.impl.runner.servlet.HarnessServletListener</listener-class>
+ </listener>
+ <listener>
+ <listener-class>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.TestListener</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.TestServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>JBoss Test Harness Test Runner</servlet-name>
+ <servlet-class>org.jboss.testharness.impl.runner.servlet.ServletTestRunner</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <filter>
+ <filter-name>TestFilter</filter-name>
+ <filter-class>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.TestFilter</filter-class>
+ </filter>
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/Test/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>JBoss Test Harness Test Runner</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <filter-mapping>
+ <filter-name>TestFilter</filter-name>
+ <url-pattern>/TestFilter</url-pattern>
+ </filter-mapping>
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+</web-app>
Modified: tck/trunk/pom.xml
===================================================================
--- tck/trunk/pom.xml 2009-07-28 07:48:40 UTC (rev 3304)
+++ tck/trunk/pom.xml 2009-07-28 07:55:07 UTC (rev 3305)
@@ -92,6 +92,11 @@
<version>2.5</version>
</dependency>
<dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.0.1B</version>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3304 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/lookup/el/integration and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-28 03:48:40 -0400 (Tue, 28 Jul 2009)
New Revision: 3304
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/Sheep.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSFTestPage.jsp
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSPTestPage.jsp
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/faces-config.xml
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/web.xml
Log:
Added tests for Unified EL integration
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java 2009-07-28 07:48:40 UTC (rev 3304)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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.jboss.jsr299.tck.tests.lookup.el.integration;
+
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.testng.annotations.Test;
+
+import com.gargoylesoftware.htmlunit.WebClient;
+
+@Artifact
+@IntegrationTest(runLocally = true)
+@Resources( {
+ @Resource(destination = WarArtifactDescriptor.WEB_XML_DESTINATION, source = "web.xml"),
+ @Resource(destination = "WEB-INF/faces-config.xml", source = "faces-config.xml"),
+ @Resource(destination = "JSFTestPage.jsp", source = "JSFTestPage.jsp"),
+ @Resource(destination = "JSPTestPage.jsp", source = "JSPTestPage.jsp")})
+@SpecVersion("2009625")
+public class IntegrationWithUnifiedELTest extends AbstractJSR299Test
+{
+ @Test(groups = { "ri-broken", "el" } )
+ @SpecAssertion(section = "5.8", id = "aaa")
+ public void testELResolverRegisteredWithJsf() throws Exception
+ {
+ WebClient webclient = new WebClient();
+ String content = webclient.getPage(getContextPath() + "JSFTestPage.jsf").getWebResponse().getContentAsString();
+ assert content.contains("Dolly");
+ }
+
+ @Test(groups = { "ri-broken", "el" } )
+ @SpecAssertion(section = "5.8", id = "aba")
+ public void testELResolverRegisteredWithServletContainer() throws Exception
+ {
+ WebClient webclient = new WebClient();
+ String content = webclient.getPage(getContextPath() + "JSPTestPage.jsp").getWebResponse().getContentAsString();
+ assert content.contains("Dolly");
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/Sheep.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/Sheep.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/Sheep.java 2009-07-28 07:48:40 UTC (rev 3304)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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.jboss.jsr299.tck.tests.lookup.el.integration;
+
+import javax.enterprise.inject.Named;
+
+@Named
+class Sheep
+{
+ private String name = "Dolly";
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSFTestPage.jsp
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSFTestPage.jsp (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSFTestPage.jsp 2009-07-28 07:48:40 UTC (rev 3304)
@@ -0,0 +1,14 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+ <head>
+ <title>JSF Test Page</title>
+ </head>
+ <body>
+ <f:view>
+ <h1>
+ <h:outputText value="#{sheep.name}"/>
+ </h1>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSPTestPage.jsp
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSPTestPage.jsp (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSPTestPage.jsp 2009-07-28 07:48:40 UTC (rev 3304)
@@ -0,0 +1,8 @@
+<html>
+ <head>
+ <title>JSP Test Page</title>
+ </head>
+ <body>
+ <h1>${sheep.name}</h1>
+ </body>
+</html>
\ No newline at end of file
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/faces-config.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/faces-config.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/faces-config.xml 2009-07-28 07:48:40 UTC (rev 3304)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2"/>
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/web.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/web.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/web.xml 2009-07-28 07:48:40 UTC (rev 3304)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <display-name>Integration with Unified EL Test</display-name>
+ <servlet>
+ <servlet-name>JBoss Test Harness Test Runner</servlet-name>
+ <servlet-class>org.jboss.testharness.impl.runner.servlet.ServletTestRunner</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>JBoss Test Harness Test Runner</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+</web-app>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3303 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection: enterprise and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-28 03:35:19 -0400 (Tue, 28 Jul 2009)
New Revision: 3303
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/Farm.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/FarmInterceptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/FarmLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/InjectedSessionBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/InjectedSessionBeanLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/SessionBeanInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/Sheep.java
Log:
Added integration tests for injection into contextual and non-contextual Session beans and their interceptors
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/Farm.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/Farm.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/Farm.java 2009-07-28 07:35:19 UTC (rev 3303)
@@ -0,0 +1,28 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.Stateless;
+import javax.enterprise.inject.Current;
+import javax.interceptor.Interceptors;
+
+@Stateless
+public class Farm implements FarmLocal
+{
+ @Current private Sheep sheep;
+ private boolean injectionPerformedCorrectly = false;
+
+ @Interceptors(FarmInterceptor.class)
+ public int getAnimalCount() {
+ return 1;
+ }
+
+ @PostConstruct
+ public void postConstruct() {
+ injectionPerformedCorrectly = sheep != null;
+ }
+
+ public boolean isInjectionPerformedCorrectly()
+ {
+ return injectionPerformedCorrectly;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/FarmInterceptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/FarmInterceptor.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/FarmInterceptor.java 2009-07-28 07:35:19 UTC (rev 3303)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import javax.enterprise.inject.Current;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.InvocationContext;
+
+public class FarmInterceptor
+{
+
+ @Current
+ private Sheep sheep;
+
+ @AroundInvoke
+ public Object intercept(InvocationContext invocation) throws Exception
+ {
+ if (sheep == null)
+ {
+ throw new RuntimeException("Sheep not injected.");
+ }
+ return (Integer)invocation.proceed() + 1;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/FarmLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/FarmLocal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/FarmLocal.java 2009-07-28 07:35:19 UTC (rev 3303)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface FarmLocal
+{
+ int getAnimalCount();
+ boolean isInjectionPerformedCorrectly();
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/InjectedSessionBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/InjectedSessionBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/InjectedSessionBean.java 2009-07-28 07:35:19 UTC (rev 3303)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import javax.ejb.EJB;
+import javax.ejb.Stateless;
+
+@Stateless
+public class InjectedSessionBean implements InjectedSessionBeanLocal
+{
+ @EJB
+ private FarmLocal farm;
+
+ public FarmLocal getFarm()
+ {
+ return farm;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/InjectedSessionBeanLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/InjectedSessionBeanLocal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/InjectedSessionBeanLocal.java 2009-07-28 07:35:19 UTC (rev 3303)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface InjectedSessionBeanLocal
+{
+ FarmLocal getFarm();
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/SessionBeanInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/SessionBeanInjectionTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/SessionBeanInjectionTest.java 2009-07-28 07:35:19 UTC (rev 3303)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecAssertions;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.testng.annotations.Test;
+
+@Artifact
+@IntegrationTest
+(a)Packaging(PackagingType.EAR)
+@SpecVersion("20090625")
+public class SessionBeanInjectionTest extends AbstractJSR299Test
+{
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "5.6", id = "a"),
+ @SpecAssertion(section = "5.6.4", id = "a")})
+ public void testInjectionOnContextualSessionBean()
+ {
+ assert getInstanceByType(FarmLocal.class).isInjectionPerformedCorrectly();
+ }
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "5.6", id = "c"),
+ @SpecAssertion(section = "5.6.4", id = "a")})
+ public void testInjectionOnNonContextualSessionBean()
+ {
+ assert getInstanceByType(InjectedSessionBeanLocal.class).getFarm().isInjectionPerformedCorrectly();
+ }
+
+ @Test(groups = "ri-broken")
+ @SpecAssertion(section = "5.6", id = "e")
+ public void testInjectionOnEJBInterceptor()
+ {
+ // Test interceptor that intercepts contextual Session Bean
+ assert getInstanceByType(FarmLocal.class).getAnimalCount() == 2;
+ // Test interceptor that intercepts non-contextual Session Bean
+ assert getInstanceByType(InjectedSessionBeanLocal.class).getFarm().getAnimalCount() == 2;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/Sheep.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/Sheep.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/enterprise/Sheep.java 2009-07-28 07:35:19 UTC (rev 3303)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.lookup.injection.enterprise;
+
+public class Sheep
+{
+
+}
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3302 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-07-28 03:34:24 -0400 (Tue, 28 Jul 2009)
New Revision: 3302
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
clarification
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-28 07:26:03 UTC (rev 3301)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-28 07:34:24 UTC (rev 3302)
@@ -2730,12 +2730,12 @@
</assertion>
<assertion id="g" testable="false">
- <text>The |PassivationCapable.getId()| method must return a value that uniquely identifies the instance of |Bean| or |Contextual|.</text>
+ <text>The |getId()| method of the |PassivationCapable| implementation must return a value that uniquely identifies the instance of |Bean| or |Contextual|.</text>
<note>This is a requirement of the implementation</note>
</assertion>
<assertion id="h" testable="false">
- <text>The |PassivationCapable.getId()| ~method must return a value that uniquely identifies the instance of |Bean| or |Contextual|. It~ is recommended that the string contain the package name of the class that implements |Bean| or |Contextual|.</text>
+ <text>The |getId()| ~method of the |PassivationCapable| implementation must return a value that uniquely identifies the instance of |Bean| or |Contextual|. It~ is recommended that the string contain the package name of the class that implements |Bean| or |Contextual|.</text>
<note>Recommendation only</note>
</assertion>
</section>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3301 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution and 6 other directories.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-28 03:26:03 -0400 (Tue, 28 Jul 2009)
New Revision: 3301
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Cat.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/Cat.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/CatInterceptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/InterceptorBinding.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/InterceptorNotResolvedTest.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/beans.xml
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/beans.xml
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java
Log:
Moved decorator and interceptor tests to separate packages
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java 2009-07-28 07:15:20 UTC (rev 3300)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java 2009-07-28 07:26:03 UTC (rev 3301)
@@ -20,6 +20,8 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.HashSet;
import java.util.Set;
import javax.enterprise.context.Dependent;
@@ -217,14 +219,4 @@
assert cat.getInjectionPoint() != null;
assert cat.getInjectionPoint().isDelegate();
}
-
- @Test(groups = { "ri-broken", "resolution" })
- @SpecAssertion(section = "5.3", id = "hb")
- // WBRI-296
- public void testDecoratorNotResolved()
- {
- Cat cat = getInstanceByType(Cat.class);
- assert cat != null;
- assert cat.getClass().equals(Cat.class);
- }
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Cat.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Cat.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Cat.java 2009-07-28 07:26:03 UTC (rev 3301)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
+
+class Cat
+{
+ public String hello() {
+ return "hello";
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java 2009-07-28 07:26:03 UTC (rev 3301)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
+
+import javax.decorator.Decorates;
+import javax.decorator.Decorator;
+
+@Decorator
+class CatDecorator extends Cat
+{
+ @Decorates Cat bean;
+
+ public String hello()
+ {
+ return bean.hello() + " world!";
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java 2009-07-28 07:26:03 UTC (rev 3301)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
+
+import java.lang.reflect.Type;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.inject.spi.Bean;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+@Artifact
+@BeansXml("beans.xml")
+@SpecVersion("20090625")
+public class DecoratorNotResolvedTest extends AbstractJSR299Test
+{
+
+ @Test(groups = { "ri-broken", "resolution" })
+ @SpecAssertion(section = "5.3", id = "hb")
+ // WBRI-260
+ // WBRI-296
+ public void testDecoratorNotResolved()
+ {
+ Set<Type> types = new HashSet<Type>();
+ for (Bean<Cat> bean : getBeans(Cat.class)) {
+ types.addAll(bean.getTypes());
+ }
+ assert !types.contains(CatDecorator.class);
+ assert getInstanceByType(Cat.class) != null;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/Cat.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/Cat.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/Cat.java 2009-07-28 07:26:03 UTC (rev 3301)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.interceptor;
+
+class Cat
+{
+ @InterceptorBinding
+ public String hello() {
+ return "hello";
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/CatInterceptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/CatInterceptor.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/CatInterceptor.java 2009-07-28 07:26:03 UTC (rev 3301)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.interceptor;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor
+@InterceptorBinding
+class CatInterceptor extends Cat
+{
+
+ @AroundInvoke
+ public Object intercept(InvocationContext ctx) throws Exception {
+ return ctx.proceed();
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/InterceptorBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/InterceptorBinding.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/InterceptorBinding.java 2009-07-28 07:26:03 UTC (rev 3301)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.interceptor;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import javax.interceptor.InterceptorBindingType;
+
+@Inherited
+@InterceptorBindingType
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@interface InterceptorBinding
+{
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/InterceptorNotResolvedTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/InterceptorNotResolvedTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/InterceptorNotResolvedTest.java 2009-07-28 07:26:03 UTC (rev 3301)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed 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.jboss.jsr299.tck.tests.lookup.typesafe.resolution.interceptor;
+
+import java.lang.reflect.Type;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.inject.spi.Bean;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+@Artifact
+@BeansXml("beans.xml")
+@SpecVersion("20090625")
+public class InterceptorNotResolvedTest extends AbstractJSR299Test
+{
+
+ @Test(groups = { "ri-broken", "resolution" })
+ @SpecAssertion(section = "5.3", id = "hq")
+ // WBRI-260
+ // WBRI-321
+ public void testInterceptorNotResolved()
+ {
+ Set<Type> types = new HashSet<Type>();
+ for (Bean<Cat> bean : getBeans(Cat.class)) {
+ types.addAll(bean.getTypes());
+ }
+ assert !types.contains(CatInterceptor.class);
+ assert getInstanceByType(Cat.class) != null;
+ }
+}
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/beans.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/beans.xml 2009-07-28 07:26:03 UTC (rev 3301)
@@ -0,0 +1,5 @@
+<beans>
+ <decorators>
+ <class>org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator.CatDecorator</class>
+ </decorators>
+</beans>
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/beans.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/interceptor/beans.xml 2009-07-28 07:26:03 UTC (rev 3301)
@@ -0,0 +1,5 @@
+<beans>
+ <interceptors>
+ <class>org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.interceptor.CatInterceptor</class>
+ </interceptors>
+</beans>
15 years, 4 months
[webbeans-commits] Webbeans SVN: r3300 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating: broken12 and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-07-28 03:15:20 -0400 (Tue, 28 Jul 2009)
New Revision: 3300
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBinding.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BrokenInterceptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/InterceptorType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/Violation.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/ViolationProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBinding.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BrokenInterceptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/InterceptorType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/Violation.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/ViolationProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBinding.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BrokenInterceptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/InterceptorType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/Violation.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/ViolationProducer.java
Log:
added passivation tests
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBean.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+import javax.enterprise.context.SessionScoped;
+
+@SessionScoped @BakedBinding
+class BakedBean
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBinding.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BakedBinding.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBindingType;
+
+@Inherited
+@InterceptorBindingType
+@InterceptorType
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@interface BakedBinding
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BrokenInterceptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BrokenInterceptor.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/BrokenInterceptor.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+import javax.enterprise.inject.Current;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor @InterceptorType
+class BrokenInterceptor
+{
+ @Current Violation violation;
+
+ @AroundInvoke
+ public Object invoke(InvocationContext ctx) throws Exception
+ {
+ return ctx.proceed();
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/InterceptorType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/InterceptorType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/InterceptorType.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.Interceptor;
+
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@Interceptor @interface InterceptorType
+{
+
+}
\ No newline at end of file
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/NonSerializableTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/NonSerializableTest.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+@SpecVersion("20090625")
+public class NonSerializableTest
+{
+ @Test(groups = { "contexts", "passivation", "ri-broken" })
+ @SpecAssertion(section = "6.6.4", id = "aac")
+ public void testPassivationCapableBeanWithNonPassivatingInterceptorFails()
+ {
+ assert false;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/Violation.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/Violation.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/Violation.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+class Violation
+{
+ public Violation(String foo) {}
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/ViolationProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/ViolationProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/ViolationProducer.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+
+import javax.enterprise.inject.Produces;
+
+class ViolationProducer
+{
+ public final @Produces Violation getViolation() { return new Violation(null); }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBean.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+import javax.enterprise.context.SessionScoped;
+
+@SessionScoped @BakedBinding
+class BakedBean
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBinding.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BakedBinding.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBindingType;
+
+@Inherited
+@InterceptorBindingType
+@InterceptorType
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@interface BakedBinding
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BrokenInterceptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BrokenInterceptor.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/BrokenInterceptor.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+import javax.enterprise.inject.Current;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor @InterceptorType
+class BrokenInterceptor
+{
+ public BrokenInterceptor(@Current Violation violation) {}
+
+ @AroundInvoke
+ public Object invoke(InvocationContext ctx) throws Exception
+ {
+ return ctx.proceed();
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/InterceptorType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/InterceptorType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/InterceptorType.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.Interceptor;
+
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@Interceptor @interface InterceptorType
+{
+
+}
\ No newline at end of file
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/NonSerializableTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/NonSerializableTest.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+@SpecVersion("20090625")
+public class NonSerializableTest
+{
+ @Test(groups = { "contexts", "passivation", "ri-broken" })
+ @SpecAssertion(section = "6.6.4", id = "aad")
+ public void testPassivationCapableBeanWithNonPassivatingInterceptorFails()
+ {
+ assert false;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/Violation.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/Violation.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/Violation.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+class Violation
+{
+ public Violation(String foo) {}
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/ViolationProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/ViolationProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/ViolationProducer.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+
+import javax.enterprise.inject.Produces;
+
+class ViolationProducer
+{
+ public final @Produces Violation getViolation() { return new Violation(null); }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBean.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+import javax.enterprise.context.SessionScoped;
+
+@SessionScoped @BakedBinding
+class BakedBean
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBinding.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BakedBinding.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.METHOD;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBindingType;
+
+@Inherited
+@InterceptorBindingType
+@InterceptorType
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@interface BakedBinding
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BrokenInterceptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BrokenInterceptor.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/BrokenInterceptor.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,20 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+import javax.enterprise.inject.Current;
+import javax.enterprise.inject.Initializer;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@Interceptor @InterceptorType
+class BrokenInterceptor
+{
+ @Initializer
+ public void init(@Current Violation violation) {}
+
+ @AroundInvoke
+ public Object invoke(InvocationContext ctx) throws Exception
+ {
+ return ctx.proceed();
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/InterceptorType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/InterceptorType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/InterceptorType.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.Interceptor;
+
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@Interceptor @interface InterceptorType
+{
+
+}
\ No newline at end of file
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/NonSerializableTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/NonSerializableTest.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+@SpecVersion("20090625")
+public class NonSerializableTest
+{
+ @Test(groups = { "contexts", "passivation", "ri-broken" })
+ @SpecAssertion(section = "6.6.4", id = "aae")
+ public void testPassivationCapableBeanWithNonPassivatingInterceptorFails()
+ {
+ assert false;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/Violation.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/Violation.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/Violation.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+class Violation
+{
+ public Violation(String foo) {}
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/ViolationProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/ViolationProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/ViolationProducer.java 2009-07-28 07:15:20 UTC (rev 3300)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+
+import javax.enterprise.inject.Produces;
+
+class ViolationProducer
+{
+ public final @Produces Violation getViolation() { return new Violation(null); }
+}
15 years, 4 months