Weld SVN: r7128 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-12-10 13:04:45 -0500 (Fri, 10 Dec 2010)
New Revision: 7128
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ClientConversationContextTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/InvalidatingSessionDestroysConversationTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/LongRunningConversationPropagatedByFacesContextTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ManualCidPropagationTest.java
Log:
CDITCK-191
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ClientConversationContextTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ClientConversationContextTest.java 2010-12-10 18:03:20 UTC (rev 7127)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ClientConversationContextTest.java 2010-12-10 18:04:45 UTC (rev 7128)
@@ -63,13 +63,13 @@
public void testConversationIdSetByContainerIsUnique() throws Exception
{
WebClient client = new WebClient();
- HtmlPage storm = client.getPage(getPath("/storm.jsf"));
+ HtmlPage storm = client.getPage(getPath("storm.jsf"));
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
storm = beginConversationButton.click();
String c1 = getCid(storm);
- storm = client.getPage(getPath("/storm.jsf"));
+ storm = client.getPage(getPath("storm.jsf"));
beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
storm = beginConversationButton.click();
@@ -85,7 +85,7 @@
{
WebClient client = new WebClient();
resetCloud(client);
- HtmlPage page = client.getPage(getPath("/cloud.jsf"));
+ HtmlPage page = client.getPage(getPath("cloud.jsf"));
assert !isLongRunning(page);
assert isCloudDestroyed(client);
}
@@ -95,13 +95,13 @@
public void testLongRunningConversationInstancesNotDestroyedAtRequestEnd() throws Exception
{
WebClient client = new WebClient();
- HtmlPage storm = client.getPage(getPath("/storm.jsf"));
+ HtmlPage storm = client.getPage(getPath("storm.jsf"));
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
storm = beginConversationButton.click();
resetCloud(client);
- client.getPage(getPath("/cloud.jsf", getCid(storm)));
+ client.getPage(getPath("cloud.jsf", getCid(storm)));
assert !isCloudDestroyed(client);
}
@@ -112,7 +112,7 @@
WebClient client = new WebClient();
client.setThrowExceptionOnFailingStatusCode(false);
// Load the page
- HtmlPage rain = client.getPage(getPath("/rain.jsf"));
+ HtmlPage rain = client.getPage(getPath("rain.jsf"));
// begin a conversation
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(rain, HtmlSubmitInput.class, "beginConversationButton");
@@ -124,14 +124,14 @@
rain = rainButton.click();
// Re-request the page, inside the conversation and check it has rained
- rain = client.getPage(getPath("/rain.jsf", cid));
+ rain = client.getPage(getPath("rain.jsf", cid));
assert hasRained(rain);
// Invalidate the session, invalidate the conversation-scoped cloud
invalidateSession(client);
// Re-request the page, check it hasn't rained
- rain = client.getPage(getPath("/rain.jsf", cid));
+ rain = client.getPage(getPath("rain.jsf", cid));
assert !hasRained(rain);
}
@@ -142,7 +142,7 @@
WebClient client = new WebClient();
// Load the page
- HtmlPage rain = client.getPage(getPath("/rain.jsf"));
+ HtmlPage rain = client.getPage(getPath("rain.jsf"));
// begin a conversation
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(rain, HtmlSubmitInput.class, "beginConversationButton");
@@ -154,13 +154,13 @@
rain = rainButton.click();
// Re-request the page, inside the conversation and check it has rained
- rain = client.getPage(getPath("/rain.jsf", cid));
+ rain = client.getPage(getPath("rain.jsf", cid));
assert hasRained(rain);
// Create a new web client and load the page
WebClient client2 = new WebClient();
client2.setThrowExceptionOnFailingStatusCode(false);
- rain = client2.getPage(getPath("/rain.jsf", cid));
+ rain = client2.getPage(getPath("rain.jsf", cid));
assert !hasRained(rain);
}
@@ -169,7 +169,7 @@
public void testConversationActiveDuringNonFacesRequest() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cloud.jsf"));
+ HtmlPage page = client.getPage(getPath("cloud.jsf"));
HtmlSpan span = getFirstMatchingElement(page, HtmlSpan.class, "cloudName");
assert span.getTextContent().equals(Cloud.NAME);
}
@@ -179,7 +179,7 @@
public void testConversationBeginMakesConversationLongRunning() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation
@@ -193,7 +193,7 @@
public void testBeginAlreadyLongRunningConversationThrowsException() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation
@@ -216,7 +216,7 @@
public void testConversationEndMakesConversationTransient() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation
@@ -235,7 +235,7 @@
public void testEndTransientConversationThrowsException() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// try ending a transient conversation
@@ -252,7 +252,7 @@
public void testBeanWithRequestScope() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/builtin.jsf"));
+ HtmlPage page = client.getPage(getPath("builtin.jsf"));
assert page.getBody().getTextContent().contains("Correct scope: true");
}
@@ -261,7 +261,7 @@
public void testBeanWithDefaultQualifier() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/builtin.jsf"));
+ HtmlPage page = client.getPage(getPath("builtin.jsf"));
assert page.getBody().getTextContent().contains("Correct qualifier: true");
}
@@ -270,7 +270,7 @@
public void testBeanWithNameJavaxEnterpriseContextConversation() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/builtin.jsf"));
+ HtmlPage page = client.getPage(getPath("builtin.jsf"));
assert page.getBody().getTextContent().contains("Correct name: true");
}
@@ -282,7 +282,7 @@
public void testTransientConversationHasNullId() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/builtin.jsf"));
+ HtmlPage page = client.getPage(getPath("builtin.jsf"));
assert page.getBody().getTextContent().contains("Default conversation has null id: true");
}
@@ -294,7 +294,7 @@
public void testConversationIdMayBeSetByApplication() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation
@@ -313,7 +313,7 @@
public void testConversationIdMayBeSetByContainer() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation
@@ -329,7 +329,7 @@
public void testNonexistentConversationExceptionThrown() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf?cid=foo"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf?cid=foo"));
assert page.getBody().getTextContent().contains("NonexistentConversationException thrown properly");
assert page.getBody().getTextContent().contains("Conversation.isTransient: true");
@@ -343,7 +343,7 @@
public void testSetConversationTimeoutOverride() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation and set a custom timeout
@@ -357,7 +357,7 @@
public void testConversationHasDefaultTimeout() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/InvalidatingSessionDestroysConversationTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/InvalidatingSessionDestroysConversationTest.java 2010-12-10 18:03:20 UTC (rev 7127)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/InvalidatingSessionDestroysConversationTest.java 2010-12-10 18:04:45 UTC (rev 7128)
@@ -51,7 +51,7 @@
{
WebClient webClient = new WebClient();
resetCloud(webClient);
- webClient.getPage(getPath("/clouds.jsf"));
+ webClient.getPage(getPath("clouds.jsf"));
assert !isCloudDestroyed(webClient);
invalidateSession(webClient);
assert isCloudDestroyed(webClient);
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/LongRunningConversationPropagatedByFacesContextTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/LongRunningConversationPropagatedByFacesContextTest.java 2010-12-10 18:03:20 UTC (rev 7127)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/LongRunningConversationPropagatedByFacesContextTest.java 2010-12-10 18:04:45 UTC (rev 7128)
@@ -61,7 +61,7 @@
public void testConversationPropagated() throws Exception
{
WebClient webClient = new WebClient();
- HtmlPage storm = webClient.getPage(getPath("/storm.jsf"));
+ HtmlPage storm = webClient.getPage(getPath("storm.jsf"));
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
storm = beginConversationButton.click();
HtmlTextInput stormStrength = getFirstMatchingElement(storm, HtmlTextInput.class, "stormStrength");
@@ -79,7 +79,7 @@
public void testConversationPropagatedOverRedirect() throws Exception
{
WebClient webClient = new WebClient();
- HtmlPage storm = webClient.getPage(getPath("/storm.jsf"));
+ HtmlPage storm = webClient.getPage(getPath("storm.jsf"));
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
storm = beginConversationButton.click();
HtmlTextInput stormStrength = getFirstMatchingElement(storm, HtmlTextInput.class, "stormStrength");
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ManualCidPropagationTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ManualCidPropagationTest.java 2010-12-10 18:03:20 UTC (rev 7127)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ManualCidPropagationTest.java 2010-12-10 18:04:45 UTC (rev 7128)
@@ -54,13 +54,13 @@
public void testManualCidPropagation() throws Exception
{
WebClient webClient = new WebClient();
- HtmlPage storm = webClient.getPage(getPath("/storm.jsf"));
+ HtmlPage storm = webClient.getPage(getPath("storm.jsf"));
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
storm = beginConversationButton.click();
String c1 = getCid(storm);
- HtmlPage cloud = webClient.getPage(getPath("/cloud.jsf", c1));
+ HtmlPage cloud = webClient.getPage(getPath("cloud.jsf", c1));
String c2 = getCid(cloud);
14 years
Weld SVN: r7127 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-12-10 13:03:20 -0500 (Fri, 10 Dec 2010)
New Revision: 7127
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/InjectionIntoWebServiceEndPointTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWS.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWSEndPoint.java
Log:
CDITCK-197
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/InjectionIntoWebServiceEndPointTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/InjectionIntoWebServiceEndPointTest.java 2010-12-10 17:36:52 UTC (rev 7126)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/InjectionIntoWebServiceEndPointTest.java 2010-12-10 18:03:20 UTC (rev 7127)
@@ -28,7 +28,7 @@
import org.testng.annotations.Test;
@Artifact
-@IntegrationTest(runLocally = true)
+@IntegrationTest
@SpecVersion(spec="cdi", version="20091101")
@WebXml("web.xml")
public class InjectionIntoWebServiceEndPointTest extends AbstractJSR299Test
@@ -47,6 +47,6 @@
{
service = new SheepWSEndPointService();
SheepWS ws = service.getSheepWSPort();
- assert ws.isSheepInjected();
+ assert ws.testSheepInjected();
}
}
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWS.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWS.java 2010-12-10 17:36:52 UTC (rev 7126)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWS.java 2010-12-10 18:03:20 UTC (rev 7127)
@@ -41,6 +41,6 @@
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "isSheepInjected", targetNamespace = "http://ws.contextual.non.injection.lookup.tests.tck.jsr299.jboss.org/", className = "org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.IsSheepInjected")
@ResponseWrapper(localName = "isSheepInjectedResponse", targetNamespace = "http://ws.contextual.non.injection.lookup.tests.tck.jsr299.jboss.org/", className = "org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.IsSheepInjectedResponse")
- public boolean isSheepInjected();
+ public boolean testSheepInjected();
}
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWSEndPoint.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWSEndPoint.java 2010-12-10 17:36:52 UTC (rev 7126)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWSEndPoint.java 2010-12-10 18:03:20 UTC (rev 7127)
@@ -33,7 +33,7 @@
}
@WebMethod
- public boolean isSheepInjected() {
+ public boolean testSheepInjected() {
return (sheep != null) && initializerCalled;
}
}
14 years
Weld SVN: r7126 - in cdi-tck/branches/1.0/impl/src/main: java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean and 1 other directories.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-12-10 12:36:52 -0500 (Fri, 10 Dec 2010)
New Revision: 7126
Added:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Consumer.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/FoxRun.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/LionCage.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Shop.java
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/QualifierDefinitionTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/ExplicitContructorSimpleBean.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Fox.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/InitializerSimpleBean.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Lion.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Order.java
cdi-tck/branches/1.0/impl/src/main/resources/tck-audit-cdi.xml
Log:
CDITCK-194
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/QualifierDefinitionTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/QualifierDefinitionTest.java 2010-12-10 15:16:11 UTC (rev 7125)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/QualifierDefinitionTest.java 2010-12-10 17:36:52 UTC (rev 7126)
@@ -62,24 +62,6 @@
InjectionPoint injectionPoint = order.getInjectionPoints().iterator().next();
assert injectionPoint.getQualifiers().contains(new DefaultLiteral());
}
-
- @Test
- @SpecAssertion(section = "2.3.1", id = "a0")
- public void testNewQualifierAndAnyBindingMutualExclusive()
- {
- New newOrderProcessor = new NewLiteral()
- {
-
- public Class<?> value()
- {
- return OrderProcessor.class;
- }
- };
- assert getBeans(OrderProcessor.class, newOrderProcessor).size() == 1;
- Bean<OrderProcessor> order = getBeans(OrderProcessor.class, newOrderProcessor).iterator().next();
- assert order.getQualifiers().size() == 1;
- assert order.getQualifiers().iterator().next().equals(newOrderProcessor);
- }
@Test(groups = { "annotationDefinition", "rewrite" })
@SpecAssertion(section = "2.3.2", id = "ba")
Added: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Consumer.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Consumer.java (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Consumer.java 2010-12-10 17:36:52 UTC (rev 7126)
@@ -0,0 +1,42 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean;
+
+import javax.enterprise.inject.New;
+import javax.inject.Inject;
+
+
+public class Consumer
+{
+
+ @Inject
+ private ExplicitContructorSimpleBean explicitConstructorBean;
+
+ @Inject @New
+ private ExplicitContructorSimpleBean newExplicitConstructorBean;
+
+ @Inject
+ private InitializerSimpleBean initializerSimpleBean;
+
+ @Inject @New
+ private InitializerSimpleBean newInitializerSimpleBean;
+
+ public ExplicitContructorSimpleBean getExplicitConstructorBean()
+ {
+ return explicitConstructorBean;
+ }
+
+ public ExplicitContructorSimpleBean getNewExplicitConstructorBean()
+ {
+ return newExplicitConstructorBean;
+ }
+
+ public InitializerSimpleBean getInitializerSimpleBean()
+ {
+ return initializerSimpleBean;
+ }
+
+ public InitializerSimpleBean getNewInitializerSimpleBean()
+ {
+ return newInitializerSimpleBean;
+ }
+
+}
Property changes on: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Consumer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/ExplicitContructorSimpleBean.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/ExplicitContructorSimpleBean.java 2010-12-10 15:16:11 UTC (rev 7125)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/ExplicitContructorSimpleBean.java 2010-12-10 17:36:52 UTC (rev 7126)
@@ -20,11 +20,9 @@
import javax.enterprise.context.SessionScoped;
import javax.enterprise.inject.Default;
-import javax.enterprise.inject.New;
+import javax.inject.Inject;
import javax.inject.Named;
-import org.jboss.jsr299.tck.literals.NewLiteral;
-
@SessionScoped
@Named("Fred") @Default
class ExplicitContructorSimpleBean implements Serializable
@@ -32,18 +30,20 @@
private static final long serialVersionUID = 1L;
private static int constructorCalls = 0;
- public static final New NEW = new NewLiteral()
- {
+ public ExplicitContructorSimpleBean() {
- public Class<?> value()
- {
- return ExplicitContructorSimpleBean.class;
- }
- };
+ }
- public ExplicitContructorSimpleBean() {
+ @Inject
+ public ExplicitContructorSimpleBean(Shop shop)
+ {
constructorCalls++;
}
+
+ public void ping()
+ {
+
+ }
public static int getConstructorCalls()
{
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Fox.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Fox.java 2010-12-10 15:16:11 UTC (rev 7125)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Fox.java 2010-12-10 17:36:52 UTC (rev 7126)
@@ -18,25 +18,12 @@
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.New;
import javax.enterprise.inject.Produces;
-import org.jboss.jsr299.tck.literals.NewLiteral;
-
@AnimalStereotype
class Fox
{
- public static final New NEW = new NewLiteral()
- {
-
- public Class<?> value()
- {
- return Fox.class;
- }
-
- };
-
@Produces
private Den den = new Den("FoxDen");
Added: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/FoxRun.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/FoxRun.java (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/FoxRun.java 2010-12-10 17:36:52 UTC (rev 7126)
@@ -0,0 +1,33 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean;
+
+import javax.enterprise.inject.New;
+import javax.inject.Inject;
+
+public class FoxRun
+{
+
+ @Inject @New
+ private Fox newFox;
+
+ public Fox getNewFox()
+ {
+ return newFox;
+ }
+
+ @Inject
+ private Fox newFox2;
+
+ public Fox getNewFox2()
+ {
+ return newFox2;
+ }
+
+ @Inject
+ private Fox fox;
+
+ public Fox getFox()
+ {
+ return fox;
+ }
+
+}
Property changes on: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/FoxRun.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/InitializerSimpleBean.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/InitializerSimpleBean.java 2010-12-10 15:16:11 UTC (rev 7125)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/InitializerSimpleBean.java 2010-12-10 17:36:52 UTC (rev 7126)
@@ -20,32 +20,19 @@
import javax.enterprise.context.SessionScoped;
import javax.enterprise.inject.Default;
-import javax.enterprise.inject.New;
import javax.inject.Inject;
import javax.inject.Named;
-import org.jboss.jsr299.tck.literals.NewLiteral;
-
@SessionScoped
@Named("Charlie") @Default
class InitializerSimpleBean implements Serializable
{
- public static final New NEW = new NewLiteral()
- {
-
- public Class<?> value()
- {
- return InitializerSimpleBean.class;
- }
-
- };
-
private static final long serialVersionUID = 1L;
- private static int initializerCalls = 0;
+ private static int initializerCalls = 0;
@Inject
- protected Order order;
+ protected Order order;
@Inject
public void initializer()
@@ -57,6 +44,11 @@
{
}
+
+ public Order getOrder()
+ {
+ return order;
+ }
public static int getInitializerCalls()
{
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Lion.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Lion.java 2010-12-10 15:16:11 UTC (rev 7125)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Lion.java 2010-12-10 17:36:52 UTC (rev 7126)
@@ -16,21 +16,10 @@
*/
package org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean;
-import javax.enterprise.inject.New;
-import org.jboss.jsr299.tck.literals.NewLiteral;
-
@Tame
class Lion
{
+
- public static final New NEW = new NewLiteral()
- {
-
- public Class<?> value()
- {
- return Lion.class;
- }
- };
-
}
Added: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/LionCage.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/LionCage.java (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/LionCage.java 2010-12-10 17:36:52 UTC (rev 7126)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean;
+
+import javax.enterprise.inject.New;
+import javax.inject.Inject;
+
+public class LionCage
+{
+
+ @Inject @New
+ private Lion newLion;
+
+ public Lion getNewLion()
+ {
+ return newLion;
+ }
+
+}
Property changes on: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/LionCage.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java 2010-12-10 15:16:11 UTC (rev 7125)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java 2010-12-10 17:36:52 UTC (rev 7126)
@@ -112,47 +112,26 @@
@Test(groups = { "new" })
@SpecAssertions({
- @SpecAssertion(section = "3.12", id = "p")
+
})
public void testNewBeanIsDependentScoped()
{
- Set<Bean<ExplicitContructorSimpleBean>> beans = getBeans(ExplicitContructorSimpleBean.class, ExplicitContructorSimpleBean.NEW);
- assert beans.size() == 1;
- Bean<ExplicitContructorSimpleBean> newSimpleBean = beans.iterator().next();
- assert Dependent.class.equals(newSimpleBean.getScope());
+ FoxRun foxRun = getInstanceByType(FoxRun.class);
+ foxRun.getNewFox().setDen(new Den("TheLarches"));
+ assert !foxRun.getNewFox().getDen().getName().equals(foxRun.getNewFox2().getDen().getName());
}
@Test(groups = { "new" })
- @SpecAssertion(section = "3.12", id = "r")
- public void testNewBeanHasOnlyNewBinding()
- {
- Set<Bean<ExplicitContructorSimpleBean>> beans = getBeans(ExplicitContructorSimpleBean.class, ExplicitContructorSimpleBean.NEW);
- assert beans.size() == 1;
- Bean<ExplicitContructorSimpleBean> newSimpleBean = beans.iterator().next();
- assert newSimpleBean.getQualifiers().size() == 1;
- assert newSimpleBean.getQualifiers().iterator().next().annotationType().equals(New.class);
- }
-
- @Test(groups = { "new" })
- @SpecAssertion(section = "3.12", id = "s")
- public void testNewBeanHasNoBeanELName()
- {
- Set<Bean<ExplicitContructorSimpleBean>> beans = getBeans(ExplicitContructorSimpleBean.class, ExplicitContructorSimpleBean.NEW);
- assert beans.size() == 1;
- Bean<ExplicitContructorSimpleBean> newSimpleBean = beans.iterator().next();
- assert newSimpleBean.getName() == null;
- }
-
- @Test(groups = { "new" })
@SpecAssertion(section = "3.12", id = "t")
public void testNewBeanHasNoStereotypes()
{
Bean<Fox> foxBean = getBeans(Fox.class).iterator().next();
assert foxBean.getScope().equals(RequestScoped.class);
assert foxBean.getName().equals("fox");
- Bean<Fox> newFoxBean = getBeans(Fox.class, Fox.NEW).iterator().next();
- assert newFoxBean.getScope().equals(Dependent.class);
- assert newFoxBean.getName() == null;
+ Fox newFox1 = getInstanceByType(FoxRun.class).getNewFox();
+ Fox newFox2 = getInstanceByType(FoxRun.class).getNewFox();
+ newFox1.setDen(new Den("TheElms"));
+ assert newFox2.getDen().getName() != "TheElms";
}
@Test(groups = { "new" })
@@ -167,37 +146,34 @@
@SpecAssertion(section = "3.12", id = "w")
public void testNewBeanHasNoProducerFields() throws Exception
{
- Fox fox = getInstanceByType(Fox.class);
- Fox newFox = getInstanceByType(Fox.class, Fox.NEW);
- newFox.setDen(new Den("NewFoxDen"));
+ FoxRun foxRun = getInstanceByType(FoxRun.class);
+ foxRun.getNewFox().setDen(new Den("NewFoxDen"));
Den theOnlyDen = getInstanceByType(Den.class);
- assert theOnlyDen.getName().equals(fox.getDen().getName());
+ assert theOnlyDen.getName().equals(foxRun.getFox().getDen().getName());
}
@Test(groups = { "new" })
@SpecAssertion(section = "3.12", id = "v")
public void testNewBeanHasNoProducerMethods() throws Exception
{
- Fox fox = getInstanceByType(Fox.class);
- Fox newFox = getInstanceByType(Fox.class, Fox.NEW);
- fox.setNextLitterSize(3);
- newFox.setNextLitterSize(5);
+ FoxRun foxRun = getInstanceByType(FoxRun.class);
+ foxRun.getFox().setNextLitterSize(3);
+ foxRun.getNewFox().setNextLitterSize(5);
Litter theOnlyLitter = getInstanceByType(Litter.class);
- assert theOnlyLitter.getQuantity() == fox.getNextLitterSize();
+ assert theOnlyLitter.getQuantity() == foxRun.getFox().getNextLitterSize();
}
@Test(groups = { "new" })
@SpecAssertion(section = "3.12", id = "x")
public void testNewBeanHasNoDisposerMethods() throws Exception
{
- Fox fox = getInstanceByType(Fox.class);
- Fox newFox = getInstanceByType(Fox.class, Fox.NEW);
+ FoxRun foxRun = getInstanceByType(FoxRun.class);
Bean<Litter> litterBean = getBeans(Litter.class).iterator().next();
CreationalContext<Litter> creationalContext = getCurrentManager().createCreationalContext(litterBean);
Litter litter = getInstanceByType(Litter.class);
litterBean.destroy(litter, creationalContext);
- assert fox.isLitterDisposed();
- assert !newFox.isLitterDisposed();
+ assert foxRun.getFox().isLitterDisposed();
+ assert !foxRun.getNewFox().isLitterDisposed();
}
@Test
@@ -208,18 +184,14 @@
assert getCurrentManager().getBeans(Order.class).iterator().next().getQualifiers().size() == 2;
assert getCurrentManager().getBeans(Order.class).iterator().next().getQualifiers().contains(new DefaultLiteral());
- assert getBeans(Order.class, Order.NEW).size() == 1;
- assert getBeans(Order.class, Order.NEW).iterator().next().getQualifiers().size() == 1;
- assert getBeans(Order.class, Order.NEW).iterator().next().getQualifiers().iterator().next().annotationType().equals(New.class);
+ assert getInstanceByType(Shop.class).getNewOrder() != null;
assert getCurrentManager().getBeans(Lion.class, TAME_LITERAL).size() == 1;
assert getCurrentManager().getBeans(Lion.class, TAME_LITERAL).iterator().next().getQualifiers().size() == 2;
assert getCurrentManager().getBeans(Lion.class, TAME_LITERAL).iterator().next().getQualifiers().contains(TAME_LITERAL);
assert getCurrentManager().getBeans(Lion.class, TAME_LITERAL).iterator().next().getQualifiers().contains(new AnyLiteral());
- assert getBeans(Lion.class, Lion.NEW).size() == 1;
- assert getBeans(Lion.class, Lion.NEW).iterator().next().getQualifiers().size() == 1;
- assert getBeans(Lion.class, Lion.NEW).iterator().next().getQualifiers().iterator().next().annotationType().equals(New.class);
+ assert getInstanceByType(LionCage.class).getNewLion() != null;
}
@Test(groups = { "new" })
@@ -227,10 +199,12 @@
public void testNewBeanHasSameConstructor()
{
ExplicitContructorSimpleBean.setConstructorCalls(0);
- ExplicitContructorSimpleBean bean = getInstanceByType(ExplicitContructorSimpleBean.class);
- ExplicitContructorSimpleBean newBean = getInstanceByType(ExplicitContructorSimpleBean.class, ExplicitContructorSimpleBean.NEW);
- assert bean != newBean;
- assert ExplicitContructorSimpleBean.getConstructorCalls() == 2;
+ Consumer consumer = getInstanceByType(Consumer.class);
+ // Make sure all deps are initialized, even if deps are lazily init'd
+ consumer.getExplicitConstructorBean().ping();
+ consumer.getNewExplicitConstructorBean().ping();
+ int calls = ExplicitContructorSimpleBean.getConstructorCalls();
+ assert calls == 2;
}
@Test(groups = { "new" })
@@ -238,21 +212,19 @@
public void testNewBeanHasSameInitializers()
{
InitializerSimpleBean.setInitializerCalls(0);
- InitializerSimpleBean bean = getInstanceByType(InitializerSimpleBean.class);
- bean.businessMethod(); // Cause proxy to initialize the bean
- InitializerSimpleBean newBean = getInstanceByType(InitializerSimpleBean.class, InitializerSimpleBean.NEW);
- assert bean != newBean;
- assert InitializerSimpleBean.getInitializerCalls() == 2;
+ Consumer consumer = getInstanceByType(Consumer.class);
+ consumer.getInitializerSimpleBean().businessMethod(); // Cause proxy to initialize the bean
+ consumer.getNewInitializerSimpleBean().businessMethod();
+ int calls = InitializerSimpleBean.getInitializerCalls();
+ assert calls == 2;
}
@Test(groups = { "new" })
@SpecAssertion(section = "3.12", id = "h")
public void testNewBeanHasSameInjectedFields()
{
- Bean<InitializerSimpleBean> simpleBean = getBeans(InitializerSimpleBean.class).iterator().next();
- Bean<InitializerSimpleBean> newSimpleBean = getBeans(InitializerSimpleBean.class, InitializerSimpleBean.NEW).iterator().next();
- assert !newSimpleBean.getInjectionPoints().isEmpty();
- assert simpleBean.getInjectionPoints().equals(newSimpleBean.getInjectionPoints());
+ Consumer consumer = getInstanceByType(Consumer.class);
+ assert consumer.getNewInitializerSimpleBean().getOrder() != null;
}
@Test
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Order.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Order.java 2010-12-10 15:16:11 UTC (rev 7125)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Order.java 2010-12-10 17:36:52 UTC (rev 7126)
@@ -18,22 +18,8 @@
import java.io.Serializable;
-import javax.enterprise.inject.New;
-
-import org.jboss.jsr299.tck.literals.NewLiteral;
-
class Order implements Serializable
{
-
- public static final New NEW = new NewLiteral()
- {
-
- public Class<?> value()
- {
- return Order.class;
- }
-
- };
private static final long serialVersionUID = 1L;
public static boolean constructed = true;
Added: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Shop.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Shop.java (rev 0)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Shop.java 2010-12-10 17:36:52 UTC (rev 7126)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.newSimpleBean;
+
+import java.io.Serializable;
+
+import javax.enterprise.inject.New;
+import javax.inject.Inject;
+
+public class Shop implements Serializable
+{
+
+ @Inject @New
+ private Order newOrder;
+
+ public Order getNewOrder()
+ {
+ return newOrder;
+ }
+
+}
Property changes on: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/Shop.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: cdi-tck/branches/1.0/impl/src/main/resources/tck-audit-cdi.xml
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/resources/tck-audit-cdi.xml 2010-12-10 15:16:11 UTC (rev 7125)
+++ cdi-tck/branches/1.0/impl/src/main/resources/tck-audit-cdi.xml 2010-12-10 17:36:52 UTC (rev 7126)
@@ -157,8 +157,9 @@
<section id="2.3.1" title="Built-in qualifier types">
- <assertion id="a0">
+ <assertion id="a0" testable="false">
<text>Every bean has the built-in qualifier |@Any|, even if it does not explicitly declare this qualifier, except for the special |@New| qualified beans defined in Section 3.12, "@New qualified beans".</text>
+ <note>Cannot be checked as @New beans aren't required to be available via programmatic lookup</note>
</assertion>
<assertion id="aa">
@@ -1596,12 +1597,14 @@
<text>This second bean has scope |@Dependent|.</text>
</assertion>
- <assertion id="r">
+ <assertion id="r" testable="false">
<text>This second bean has exactly one qualifier: |(a)javax.enterprise.inject.New(X.class)| where |x| is the bean class.</text>
+ <note>Cannot look up Bean programmatically</note>
</assertion>
- <assertion id="s">
+ <assertion id="s" testable="false">
<text>This second bean has no bean EL name.</text>
+ <note>Cannot lookup Bean programmatically</note>
</assertion>
<assertion id="t">
14 years
Weld SVN: r7125 - cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-12-10 10:16:11 -0500 (Fri, 10 Dec 2010)
New Revision: 7125
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/FooBar.java
Log:
CDITCK-196
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/FooBar.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/FooBar.java 2010-12-10 15:10:12 UTC (rev 7124)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/FooBar.java 2010-12-10 15:16:11 UTC (rev 7125)
@@ -25,7 +25,7 @@
* @author pmuir
*
*/
-public interface FooBar extends Foo, Bar
+public interface FooBar extends Foo, Bar, Boo
{
public static final Set<Type> TYPES = new HashSet<Type>(Arrays.asList(FooBar.class));
14 years
Weld SVN: r7124 - cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-12-10 10:10:12 -0500 (Fri, 10 Dec 2010)
New Revision: 7124
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ClientConversationContextTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/InvalidatingSessionDestroysConversationTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/LongRunningConversationPropagatedByFacesContextTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ManualCidPropagationTest.java
Log:
CDITCK-191
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ClientConversationContextTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ClientConversationContextTest.java 2010-12-09 13:48:50 UTC (rev 7123)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ClientConversationContextTest.java 2010-12-10 15:10:12 UTC (rev 7124)
@@ -63,13 +63,13 @@
public void testConversationIdSetByContainerIsUnique() throws Exception
{
WebClient client = new WebClient();
- HtmlPage storm = client.getPage(getPath("/storm.jsf"));
+ HtmlPage storm = client.getPage(getPath("storm.jsf"));
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
storm = beginConversationButton.click();
String c1 = getCid(storm);
- storm = client.getPage(getPath("/storm.jsf"));
+ storm = client.getPage(getPath("storm.jsf"));
beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
storm = beginConversationButton.click();
@@ -85,7 +85,7 @@
{
WebClient client = new WebClient();
resetCloud(client);
- HtmlPage page = client.getPage(getPath("/cloud.jsf"));
+ HtmlPage page = client.getPage(getPath("cloud.jsf"));
assert !isLongRunning(page);
assert isCloudDestroyed(client);
}
@@ -95,13 +95,13 @@
public void testLongRunningConversationInstancesNotDestroyedAtRequestEnd() throws Exception
{
WebClient client = new WebClient();
- HtmlPage storm = client.getPage(getPath("/storm.jsf"));
+ HtmlPage storm = client.getPage(getPath("storm.jsf"));
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
storm = beginConversationButton.click();
resetCloud(client);
- client.getPage(getPath("/cloud.jsf", getCid(storm)));
+ client.getPage(getPath("cloud.jsf", getCid(storm)));
assert !isCloudDestroyed(client);
}
@@ -112,7 +112,7 @@
WebClient client = new WebClient();
client.setThrowExceptionOnFailingStatusCode(false);
// Load the page
- HtmlPage rain = client.getPage(getPath("/rain.jsf"));
+ HtmlPage rain = client.getPage(getPath("rain.jsf"));
// begin a conversation
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(rain, HtmlSubmitInput.class, "beginConversationButton");
@@ -124,14 +124,14 @@
rain = rainButton.click();
// Re-request the page, inside the conversation and check it has rained
- rain = client.getPage(getPath("/rain.jsf", cid));
+ rain = client.getPage(getPath("rain.jsf", cid));
assert hasRained(rain);
// Invalidate the session, invalidate the conversation-scoped cloud
invalidateSession(client);
// Re-request the page, check it hasn't rained
- rain = client.getPage(getPath("/rain.jsf", cid));
+ rain = client.getPage(getPath("rain.jsf", cid));
assert !hasRained(rain);
}
@@ -142,7 +142,7 @@
WebClient client = new WebClient();
// Load the page
- HtmlPage rain = client.getPage(getPath("/rain.jsf"));
+ HtmlPage rain = client.getPage(getPath("rain.jsf"));
// begin a conversation
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(rain, HtmlSubmitInput.class, "beginConversationButton");
@@ -154,13 +154,13 @@
rain = rainButton.click();
// Re-request the page, inside the conversation and check it has rained
- rain = client.getPage(getPath("/rain.jsf", cid));
+ rain = client.getPage(getPath("rain.jsf", cid));
assert hasRained(rain);
// Create a new web client and load the page
WebClient client2 = new WebClient();
client2.setThrowExceptionOnFailingStatusCode(false);
- rain = client2.getPage(getPath("/rain.jsf", cid));
+ rain = client2.getPage(getPath("rain.jsf", cid));
assert !hasRained(rain);
}
@@ -169,7 +169,7 @@
public void testConversationActiveDuringNonFacesRequest() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cloud.jsf"));
+ HtmlPage page = client.getPage(getPath("cloud.jsf"));
HtmlSpan span = getFirstMatchingElement(page, HtmlSpan.class, "cloudName");
assert span.getTextContent().equals(Cloud.NAME);
}
@@ -179,7 +179,7 @@
public void testConversationBeginMakesConversationLongRunning() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation
@@ -193,7 +193,7 @@
public void testBeginAlreadyLongRunningConversationThrowsException() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation
@@ -216,7 +216,7 @@
public void testConversationEndMakesConversationTransient() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation
@@ -235,7 +235,7 @@
public void testEndTransientConversationThrowsException() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// try ending a transient conversation
@@ -252,7 +252,7 @@
public void testBeanWithRequestScope() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/builtin.jsf"));
+ HtmlPage page = client.getPage(getPath("builtin.jsf"));
assert page.getBody().getTextContent().contains("Correct scope: true");
}
@@ -261,7 +261,7 @@
public void testBeanWithDefaultQualifier() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/builtin.jsf"));
+ HtmlPage page = client.getPage(getPath("builtin.jsf"));
assert page.getBody().getTextContent().contains("Correct qualifier: true");
}
@@ -270,7 +270,7 @@
public void testBeanWithNameJavaxEnterpriseContextConversation() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/builtin.jsf"));
+ HtmlPage page = client.getPage(getPath("builtin.jsf"));
assert page.getBody().getTextContent().contains("Correct name: true");
}
@@ -282,7 +282,7 @@
public void testTransientConversationHasNullId() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/builtin.jsf"));
+ HtmlPage page = client.getPage(getPath("builtin.jsf"));
assert page.getBody().getTextContent().contains("Default conversation has null id: true");
}
@@ -294,7 +294,7 @@
public void testConversationIdMayBeSetByApplication() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation
@@ -313,7 +313,7 @@
public void testConversationIdMayBeSetByContainer() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation
@@ -324,6 +324,17 @@
assert page.getBody().getTextContent().contains("Cumulus congestus");
}
+ @Test(groups = { "contexts" })
+ @SpecAssertion(section = "6.7.4", id = "tb")
+ public void testNonexistentConversationExceptionThrown() throws Exception
+ {
+ WebClient client = new WebClient();
+ HtmlPage page = client.getPage(getPath("cumulus.jsf?cid=foo"));
+
+ assert page.getBody().getTextContent().contains("NonexistentConversationException thrown properly");
+ assert page.getBody().getTextContent().contains("Conversation.isTransient: true");
+ }
+
@Test
@SpecAssertions({
@SpecAssertion(section = "6.7.5", id = "m"),
@@ -332,7 +343,7 @@
public void testSetConversationTimeoutOverride() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation and set a custom timeout
@@ -346,7 +357,7 @@
public void testConversationHasDefaultTimeout() throws Exception
{
WebClient client = new WebClient();
- HtmlPage page = client.getPage(getPath("/cumulus.jsf"));
+ HtmlPage page = client.getPage(getPath("cumulus.jsf"));
assert !isLongRunning(page);
// begin a conversation
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/InvalidatingSessionDestroysConversationTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/InvalidatingSessionDestroysConversationTest.java 2010-12-09 13:48:50 UTC (rev 7123)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/InvalidatingSessionDestroysConversationTest.java 2010-12-10 15:10:12 UTC (rev 7124)
@@ -51,7 +51,7 @@
{
WebClient webClient = new WebClient();
resetCloud(webClient);
- webClient.getPage(getPath("/clouds.jsf"));
+ webClient.getPage(getPath("clouds.jsf"));
assert !isCloudDestroyed(webClient);
invalidateSession(webClient);
assert isCloudDestroyed(webClient);
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/LongRunningConversationPropagatedByFacesContextTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/LongRunningConversationPropagatedByFacesContextTest.java 2010-12-09 13:48:50 UTC (rev 7123)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/LongRunningConversationPropagatedByFacesContextTest.java 2010-12-10 15:10:12 UTC (rev 7124)
@@ -61,7 +61,7 @@
public void testConversationPropagated() throws Exception
{
WebClient webClient = new WebClient();
- HtmlPage storm = webClient.getPage(getPath("/storm.jsf"));
+ HtmlPage storm = webClient.getPage(getPath("storm.jsf"));
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
storm = beginConversationButton.click();
HtmlTextInput stormStrength = getFirstMatchingElement(storm, HtmlTextInput.class, "stormStrength");
@@ -79,7 +79,7 @@
public void testConversationPropagatedOverRedirect() throws Exception
{
WebClient webClient = new WebClient();
- HtmlPage storm = webClient.getPage(getPath("/storm.jsf"));
+ HtmlPage storm = webClient.getPage(getPath("storm.jsf"));
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
storm = beginConversationButton.click();
HtmlTextInput stormStrength = getFirstMatchingElement(storm, HtmlTextInput.class, "stormStrength");
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ManualCidPropagationTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ManualCidPropagationTest.java 2010-12-09 13:48:50 UTC (rev 7123)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/ManualCidPropagationTest.java 2010-12-10 15:10:12 UTC (rev 7124)
@@ -54,13 +54,13 @@
public void testManualCidPropagation() throws Exception
{
WebClient webClient = new WebClient();
- HtmlPage storm = webClient.getPage(getPath("/storm.jsf"));
+ HtmlPage storm = webClient.getPage(getPath("storm.jsf"));
HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class, "beginConversationButton");
storm = beginConversationButton.click();
String c1 = getCid(storm);
- HtmlPage cloud = webClient.getPage(getPath("/cloud.jsf", c1));
+ HtmlPage cloud = webClient.getPage(getPath("cloud.jsf", c1));
String c2 = getCid(cloud);
14 years
Weld SVN: r7123 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-12-09 08:48:50 -0500 (Thu, 09 Dec 2010)
New Revision: 7123
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/FooBar.java
Log:
CDITCK-196
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/FooBar.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/FooBar.java 2010-12-09 05:04:21 UTC (rev 7122)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/FooBar.java 2010-12-09 13:48:50 UTC (rev 7123)
@@ -25,7 +25,7 @@
* @author pmuir
*
*/
-public interface FooBar extends Foo, Bar
+public interface FooBar extends Foo, Bar, Boo
{
public static final Set<Type> TYPES = new HashSet<Type>(Arrays.asList(FooBar.class));
14 years
Weld SVN: r7122 - cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws.
by weld-commits@lists.jboss.org
Author: marius.bogoevici
Date: 2010-12-09 00:04:21 -0500 (Thu, 09 Dec 2010)
New Revision: 7122
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/InjectionIntoWebServiceEndPointTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWS.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWSEndPoint.java
Log:
CDITCK-197
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/InjectionIntoWebServiceEndPointTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/InjectionIntoWebServiceEndPointTest.java 2010-12-07 17:54:48 UTC (rev 7121)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/InjectionIntoWebServiceEndPointTest.java 2010-12-09 05:04:21 UTC (rev 7122)
@@ -28,7 +28,7 @@
import org.testng.annotations.Test;
@Artifact
-@IntegrationTest(runLocally = true)
+@IntegrationTest
@SpecVersion(spec="cdi", version="20091101")
@WebXml("web.xml")
public class InjectionIntoWebServiceEndPointTest extends AbstractJSR299Test
@@ -47,6 +47,6 @@
{
service = new SheepWSEndPointService();
SheepWS ws = service.getSheepWSPort();
- assert ws.isSheepInjected();
+ assert ws.testSheepInjected();
}
}
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWS.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWS.java 2010-12-07 17:54:48 UTC (rev 7121)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWS.java 2010-12-09 05:04:21 UTC (rev 7122)
@@ -41,6 +41,6 @@
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "isSheepInjected", targetNamespace = "http://ws.contextual.non.injection.lookup.tests.tck.jsr299.jboss.org/", className = "org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.IsSheepInjected")
@ResponseWrapper(localName = "isSheepInjectedResponse", targetNamespace = "http://ws.contextual.non.injection.lookup.tests.tck.jsr299.jboss.org/", className = "org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.IsSheepInjectedResponse")
- public boolean isSheepInjected();
+ public boolean testSheepInjected();
}
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWSEndPoint.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWSEndPoint.java 2010-12-07 17:54:48 UTC (rev 7121)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/SheepWSEndPoint.java 2010-12-09 05:04:21 UTC (rev 7122)
@@ -33,7 +33,7 @@
}
@WebMethod
- public boolean isSheepInjected() {
+ public boolean testSheepInjected() {
return (sheep != null) && initializerCalled;
}
}
14 years
Weld SVN: r7121 - in cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise: newBean and 1 other directory.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-12-07 12:54:48 -0500 (Tue, 07 Dec 2010)
New Revision: 7121
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/ExplicitConstructorSessionBean.java
Log:
CDITCK-195
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java 2010-12-07 17:54:13 UTC (rev 7120)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java 2010-12-07 17:54:48 UTC (rev 7121)
@@ -16,6 +16,7 @@
*/
package org.jboss.jsr299.tck.tests.implementation.enterprise.definition;
+import javax.ejb.Singleton;
import javax.ejb.Stateless;
import javax.enterprise.inject.New;
import javax.inject.Inject;
@@ -38,6 +39,8 @@
}
};
+ public ExplicitConstructorSessionBean() {}
+
@Inject
public ExplicitConstructorSessionBean(SimpleBean bean)
{
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/ExplicitConstructorSessionBean.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/ExplicitConstructorSessionBean.java 2010-12-07 17:54:13 UTC (rev 7120)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/ExplicitConstructorSessionBean.java 2010-12-07 17:54:48 UTC (rev 7121)
@@ -38,6 +38,8 @@
}
};
+ public ExplicitConstructorSessionBean(){}
+
@Inject
public ExplicitConstructorSessionBean(SimpleBean bean)
{
14 years
Weld SVN: r7120 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-12-07 12:54:13 -0500 (Tue, 07 Dec 2010)
New Revision: 7120
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/IndirectStockWatcher.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/LazyFarmer.java
Log:
CDITCK-190
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/IndirectStockWatcher.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/IndirectStockWatcher.java 2010-12-07 17:53:33 UTC (rev 7119)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/IndirectStockWatcher.java 2010-12-07 17:54:13 UTC (rev 7120)
@@ -18,6 +18,6 @@
import javax.ejb.Stateful;
-public @Stateful class IndirectStockWatcher extends IntermediateStockWatcher implements IndirectStockWatcherLocal
+public @Stateful class IndirectStockWatcher extends IntermediateStockWatcher implements IndirectStockWatcherLocal,StockWatcherLocal
{
}
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/LazyFarmer.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/LazyFarmer.java 2010-12-07 17:53:33 UTC (rev 7119)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/LazyFarmer.java 2010-12-07 17:54:13 UTC (rev 7120)
@@ -18,6 +18,6 @@
import javax.ejb.Stateful;
-public @Stateful class LazyFarmer extends Farmer implements LazyFarmerLocal
+public @Stateful class LazyFarmer extends Farmer implements LazyFarmerLocal,FarmerLocal
{
}
\ No newline at end of file
14 years
Weld SVN: r7119 - in cdi-tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/event and 3 other directories.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-12-07 12:53:33 -0500 (Tue, 07 Dec 2010)
New Revision: 7119
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Farmer.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/Terrier.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java
cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
Log:
CDITCK-184
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java 2010-12-07 17:49:20 UTC (rev 7118)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java 2010-12-07 17:53:33 UTC (rev 7119)
@@ -16,16 +16,13 @@
*/
package org.jboss.jsr299.tck;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.List;
import java.util.Set;
@@ -123,7 +120,7 @@
return typeList.size() == 0;
}
- public boolean typeSetMatches(Set<Type> types, Type... requiredTypes)
+ public boolean typeSetMatches(Collection<? extends Type> types, Type... requiredTypes)
{
List<Type> typeList = Arrays.asList(requiredTypes);
return requiredTypes.length == types.size() && types.containsAll(typeList);
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2010-12-07 17:49:20 UTC (rev 7118)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2010-12-07 17:53:33 UTC (rev 7119)
@@ -17,11 +17,9 @@
package org.jboss.jsr299.tck.tests.event;
import java.util.ArrayList;
-import java.util.Set;
import javax.enterprise.context.spi.Context;
import javax.enterprise.event.TransactionPhase;
-import javax.enterprise.inject.spi.ObserverMethod;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.test.audit.annotations.SpecAssertion;
@@ -126,17 +124,11 @@
*/
@Test(groups = { "events", "inheritance" })
@SpecAssertion(section = "4.2", id = "dc")
- public void testNonStaticObserverMethodNotInherited()
+ public void testNonStaticObserverMethodInherited()
{
Egg egg = new Egg();
- Set<ObserverMethod<? super Egg>> observers = getCurrentManager().resolveObserverMethods(egg);
- assert observers.size() == 1;
-
- // Reception the observer so we can confirm that it
- // is a method only on Farmer, and not LazyFarmer
- observers.iterator().next().notify(egg);
- assert egg.getClassesVisited().size() == 1;
- assert egg.getClassesVisited().iterator().next().equals(Farmer.class);
+ getCurrentManager().fireEvent(egg);
+ assert typeSetMatches(egg.getClassesVisited(), Farmer.class, LazyFarmer.class);
}
@Test(groups = { "events", "inheritance" })
@@ -144,18 +136,11 @@
@SpecAssertion(section = "4.2", id = "di"),
@SpecAssertion(section = "11.1.3", id = "f")
})
- public void testNonStaticObserverMethodNotIndirectlyInherited()
+ public void testNonStaticObserverMethodIndirectlyInherited()
{
StockPrice price = new StockPrice();
- Set<ObserverMethod<? super StockPrice>> observers = getCurrentManager().resolveObserverMethods(price);
- assert observers.size() == 1;
-
- // Reception the observer so we can confirm that it
- // is a method only on StockWatcher, and not IntermediateStockWatcher
- // or IndirectStockWatcher
- observers.iterator().next().notify(price);
- assert price.getClassesVisited().size() == 1;
- assert price.getClassesVisited().iterator().next().equals(StockWatcher.class);
+ getCurrentManager().fireEvent(price);
+ assert typeSetMatches(price.getClassesVisited(), StockWatcher.class, IntermediateStockWatcher.class, IndirectStockWatcher.class);
}
@Test(groups = { "events" })
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Farmer.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Farmer.java 2010-12-07 17:49:20 UTC (rev 7118)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Farmer.java 2010-12-07 17:53:33 UTC (rev 7119)
@@ -18,19 +18,12 @@
import javax.enterprise.event.Observes;
-class Farmer
+public class Farmer
{
- private static Class<?> observerClazz;
public void observeEggLaying(@Observes Egg egg)
{
- observerClazz = this.getClass();
egg.recordVisit(this);
}
-
- public static Class<?> getObserverClazz()
- {
- return observerClazz;
- }
}
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java 2010-12-07 17:49:20 UTC (rev 7118)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java 2010-12-07 17:53:33 UTC (rev 7119)
@@ -17,36 +17,12 @@
package org.jboss.jsr299.tck.tests.event;
import javax.enterprise.event.Observes;
-import javax.enterprise.inject.Any;
class StockWatcher
{
- private static Class<?> observerClazz;
- private static boolean anyVolumeObserved = false;
public void observeStockPrice(@Observes StockPrice price)
{
- observerClazz = this.getClass();
price.recordVisit(this);
}
-
- public void observeAllVolume(@Observes @Any Volume volume)
- {
- anyVolumeObserved = true;
- }
-
- public static Class<?> getObserverClazz()
- {
- return observerClazz;
- }
-
- public static boolean isAnyVolumeObserved()
- {
- return anyVolumeObserved;
- }
-
- public static void setAnyVolumeObserved(boolean anyStockPriceObserved)
- {
- StockWatcher.anyVolumeObserved = anyStockPriceObserved;
- }
}
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/Terrier.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/Terrier.java 2010-12-07 17:49:20 UTC (rev 7118)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/Terrier.java 2010-12-07 17:53:33 UTC (rev 7119)
@@ -19,7 +19,7 @@
import javax.ejb.Local;
@Local
-interface Terrier
+public interface Terrier
{
}
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java 2010-12-07 17:49:20 UTC (rev 7118)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java 2010-12-07 17:53:33 UTC (rev 7119)
@@ -16,10 +16,6 @@
*/
package org.jboss.jsr299.tck.tests.event.observer.enterprise;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.ObserverMethod;
-
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.test.audit.annotations.SpecVersion;
@@ -42,31 +38,19 @@
{
@Test(groups = { "events", "inheritance" })
@SpecAssertion(section = "4.2", id = "df")
- public void testNonStaticObserverMethodNotInherited() throws Exception
+ public void testNonStaticObserverMethodInherited() throws Exception
{
Egg egg = new Egg();
- Set<ObserverMethod<? super Egg>> observers = getCurrentManager().resolveObserverMethods(egg);
- assert observers.size() == 1;
-
- // Reception the observer so we can confirm that it
- // is a method only on Farmer, and not LazyFarmer
- observers.iterator().next().notify(egg);
- assert egg.getClassesVisited().size() == 1;
- assert FarmerLocal.class.isAssignableFrom(egg.getClassesVisited().iterator().next());
+ getCurrentManager().fireEvent(egg);
+ assert typeSetMatches(egg.getClassesVisited(), Farmer.class, LazyFarmer.class);
}
@Test(groups = { "events", "inheritance" })
@SpecAssertion(section = "4.2", id = "dl")
- public void testNonStaticObserverMethodNotIndirectlyInherited() throws Exception
+ public void testNonStaticObserverMethodIndirectlyInherited() throws Exception
{
StockPrice stockPrice = new StockPrice();
- Set<ObserverMethod<? super StockPrice>> observers = getCurrentManager().resolveObserverMethods(stockPrice);
- assert observers.size() == 1;
-
- // Reception the observer so we can confirm that it
- // is a method only on StockWatcher, and not IndirectStockWatcher
- observers.iterator().next().notify(stockPrice);
- assert stockPrice.getClassesVisited().size() == 1;
- assert StockWatcherLocal.class.isAssignableFrom(stockPrice.getClassesVisited().iterator().next());
+ getCurrentManager().fireEvent(stockPrice);
+ assert typeSetMatches(stockPrice.getClassesVisited(), StockWatcher.class, IndirectStockWatcher.class, IntermediateStockWatcher.class);
}
}
Modified: cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
===================================================================
--- cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2010-12-07 17:49:20 UTC (rev 7118)
+++ cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2010-12-07 17:53:33 UTC (rev 7119)
@@ -1851,133 +1851,193 @@
</section>
- <section id="4.2" title="Inheritance of member-level metadata">
+ <section id="4.2" title="Inheritance of member-level metadata">
+
+ <group>
+ <text>Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y. If X declares an injected field x then Y inherits x.</text>
+
+ <assertion id="aa">
+ <text>Check managed bean X _directly_ extends managed bean Y</text>
+ </assertion>
- <assertion id="aa">
- <text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares an injected field x then Y inherits x.</text>
- </assertion>
+ <assertion id="ac">
+ <text>Check managed bean X _indirectly_ extends managed bean Y</text>
+ </assertion>
+
+ <assertion id="ab">
+ <text>Check session bean X _directly_ extends session bean Y</text>
+ </assertion>
- <assertion id="ab">
- <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares an injected field x then Y inherits x.</text>
- </assertion>
+ <assertion id="ad">
+ <text>Check session bean X _indirectly_ extends session bean Y</text>
+ </assertion>
+ </group>
- <assertion id="ac">
- <text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares an injected field x then Y inherits x.</text>
- </assertion>
+ <group>
+ <text>Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y. If X declares an initializer, non-static observer, @PostConstruct or @PreDestroy method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().</text>
+
+ <assertion id="baa">
+ <text>Check managed bean X _directly_ extends managed bean Y with _|@PostConstruct|_</text>
+ </assertion>
+
+ <assertion id="bab">
+ <text>Check session bean X _directly_ extends session bean Y with _|@PostConstruct|_</text>
+ </assertion>
- <assertion id="ad">
- <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares an injected field x then Y inherits x.</text>
- </assertion>
+ <assertion id="bac">
+ <text>Check managed bean X _indirectly_ extends managed bean Y with _|@PostConstruct|_</text>
+ </assertion>
+
+ <assertion id="bad">
+ <text>Check session bean X _indirectly_ extends session bean Y with _|@PostConstruct|_</text>
+ </assertion>
+
+ <assertion id="bba">
+ <text>Check managed bean X _directly_ extends managed bean Y with _|@PostDestroy|_</text>
+ </assertion>
- <assertion id="baa">
- <text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares a _|@PostConstruct|_ method x() then Y inherits x() if and only if Y does not override the method x()</text>
- </assertion>
+ <assertion id="bbb">
+ <text>Check session bean X _directly_ extends session bean Y with _|@PostDestroy|_</text>
+ </assertion>
+
+ <assertion id="bbc">
+ <text>Check managed bean X _indirectly_ extends managed bean Y with _|@PostDestroy|_</text>
+ </assertion>
- <assertion id="bab">
- <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _|@PostConstruct|_ method x() then Y inherits x() if and only if Y does not override the method x()</text>
- </assertion>
+ <assertion id="bbd">
+ <text>Check session bean X _indirectly_ extends session bean Y with _|@PostDestroy|_</text>
+ </assertion>
+
+ <assertion id="dc">
+ <text>Check managed bean X _directly_ extends managed bean Y with a _non-static observer method_</text>
+ </assertion>
- <assertion id="bac">
- <text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares a _|@PostConstruct|_ method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
- </assertion>
+ <assertion id="df">
+ <text>Check session bean X _directly_ extends session bean Y with a _non-static observer method_</text>
+ </assertion>
+
+ <assertion id="di">
+ <text>Check managed bean X _indirectly_ extends managed bean Y with a _non-static observer method_</text>
+ </assertion>
+
+ <assertion id="dl">
+ <text>Check session bean X _indirectly_ extends session bean Y with a _non-static observer method_</text>
+ </assertion>
+
+ <assertion id="dm">
+ <text>Check managed bean X _directly_ extends managed bean Y with a _initializer method_</text>
+ </assertion>
- <assertion id="bad">
- <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _|@PostConstruct|_ method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
- </assertion>
+ <assertion id="dn">
+ <text>Check session bean X _directly_ extends session bean Y with a _initializer method_</text>
+ </assertion>
+
+ <assertion id="do">
+ <text>Check managed bean X _indirectly_ extends managed bean Y with a _initializer method_</text>
+ </assertion>
+
+ <assertion id="dp">
+ <text>Check session bean X _indirectly_ extends session bean Y with a _initializer method_</text>
+ </assertion>
+
+ </group>
+
+ <group>
+ <text>Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y. If X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().</text>
+
+ <assertion id="ka">
+ <text>Check managed bean X _directly_ extends managed bean Y</text>
+ </assertion>
- <assertion id="bba">
- <text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares a _|@PreDestroy|_ method x() then Y inherits x() if and only if Y does not override the method x()</text>
- </assertion>
+ <assertion id="kb">
+ <text>Check session bean X _directly_ extends session bean Y</text>
+ </assertion>
+
+ <assertion id="kc">
+ <text>Check managed bean X _indirectly_ extends managed bean Y</text>
+ </assertion>
+
+ <assertion id="kd">
+ <text>Check session bean X _indirectly_ extends session bean Y</text>
+ </assertion>
+ </group>
+
+ <group>
+ <text>Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y .If X declares a non-static producer or disposer method x() then Y does not inherit this method.</text>
+
+ <assertion id="da">
+ <text>Check managed bean X _directly_ extends managed bean Y with a _non-static producer method_</text>
+ </assertion>
- <assertion id="bbb">
- <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _|@PreDestroy|_ method x() then Y inherits x() if and only if Y does not override the method x()</text>
- </assertion>
+ <assertion id="db">
+ <text>Check managed bean X _directly_ extends managed bean Y with a _non-static disposer method_</text>
+ </assertion>
- <assertion id="bbc">
- <text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares a _|@PreDestroy|_ method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
- </assertion>
+ <assertion id="dd">
+ <text>Check session bean X _directly_ extends session bean Y with a _non-static producer method_</text>
+ </assertion>
- <assertion id="bbd">
- <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _|@PreDestroy|_ method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
- </assertion>
+ <assertion id="de">
+ <text>Check session bean X _directly_ extends session bean Y with a _non-static disposer method_</text>
+ </assertion>
- <assertion id="da">
- <text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="dg">
+ <text>Check managed bean X _indirectly_ extends managed bean Y with a _non-static producer method_</text>
+ </assertion>
- <assertion id="db">
- <text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares a _non-static disposer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="dh">
+ <text>Check managed bean X _indirectly_ extends managed bean Y with a _non-static disposer method_</text>
+ </assertion>
- <assertion id="dc">
- <text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="dj">
+ <text>Check session bean X _indirectly_ extends session bean Y with a _non-static producer method_</text>
+ </assertion>
- <assertion id="dd">
- <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="dk">
+ <text>Check session bean X _indirectly_ extends session bean Y with a _non-static disposer method_</text>
+ </assertion>
+
+ </group>
+
+ <group>
+ <text>Suppose a class X is extended directly or indirectly by the bean class of a managed bean or session bean Y. If X declares a non-static producer field x then Y does not inherit this field.</text>
+
+ <assertion id="ea">
+ <text>Check managed bean X _directly_ extends managed bean Y</text>
+ <note>We don't test session beans, as they can't have non-static producer fields</note>
+ </assertion>
- <assertion id="de">
- <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _non-static disposer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="ec">
+ <text>Check managed bean X _indirectly_ extends managed bean Y</text>
+ <note>We don't test session beans, as they can't have non-static producer fields</note>
+ </assertion>
+
+ </group>
+
+ <group>
+ <text>If X is a generic type, and an injection point, producer method, producer field, disposer method or observer method declared by X is inherited by Y, and the declared type of the injection point, producer method, producer field, disposed para- meter or event parameter contains type variables declared by X, the type of the injection point, producer method, producer field, disposed parameter or event parameter inherited in Y is the declared type, after substitution of actual type arguments declared by Y or any intermediate class that is a subclass of X and a superclass of Y.</text>
+
+ <assertion id="f">
+ <text>Check injection point</text>
+ </assertion>
- <assertion id="df">
- <text>For class X which is extended _directly_ by the bean class of a _session_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="g">
+ <text>Check producer method</text>
+ </assertion>
- <assertion id="dg">
- <text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="h">
+ <text>Check producer field</text>
+ </assertion>
- <assertion id="dh">
- <text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares a _non-static disposer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="i">
+ <text>Check disposer method</text>
+ </assertion>
- <assertion id="di">
- <text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="j">
+ <text>check observer method</text>
+ </assertion>
+ </group>
- <assertion id="dj">
- <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
-
- <assertion id="dk">
- <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _non-static disposer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
-
- <assertion id="dl">
- <text>For class X which is extended _indirectly_ by the bean class of a _session_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit this method unless Y is explicitly declared to specialize X</text>
- </assertion>
-
- <assertion id="ea">
- <text>For class X which is extended _directly_ by the bean class of a _managed_ bean Y, if X declares a _non-static producer field_ x then Y does not inherit this field unless Y is explicitly declared to specialize X.</text>
- <note>We don't test session beans, as they can't have non-static producer fields</note>
- </assertion>
-
- <assertion id="ec">
- <text>For class X which is extended _indirectly_ by the bean class of a _managed_ bean Y, if X declares a _non-static producer field_ x then Y does not inherit this field unless Y is explicitly declared to specialize X.</text>
- <note>We don't test session beans, as they can't have non-static producer fields</note>
- </assertion>
-
- <assertion id="f">
- <text>If X is a generic type, and an injection point declared by X is inherited by Y, and the declared type of the injection point contains type variables declared by X, the type of the injection point inherited in Y is the declared type, after substitution of actual type arguments declared by Y or any intermediate class that is a subclass of X and a superclass of Y.</text>
- </assertion>
-
- <assertion id="g">
- <text>If X is a generic type, and a producer method declared by X is inherited by Y, and the declared type of the producer method contains type variables declared by X, the type of the producer method inherited in Y is the declared type, after substitution of actual type arguments declared by Y or any intermediate class that is a subclass of X and a superclass of Y.</text>
- </assertion>
-
- <assertion id="h">
- <text>If X is a generic type, and a producer field declared by X is inherited by Y, and the declared type of the producer field contains type variables declared by X, the type of the producer field inherited in Y is the declared type, after substitution of actual type arguments declared by Y or any intermediate class that is a subclass of X and a superclass of Y.</text>
- </assertion>
-
- <assertion id="i">
- <text>If X is a generic type, and a disposer method declared by X is inherited by Y, and the declared type of the disposed parameter contains type variables declared by X, the type of the disposed parameter inherited in Y is the declared type, after substitution of actual type arguments declared by Y or any intermediate class that is a subclass of X and a superclass of Y.</text>
- </assertion>
-
- <assertion id="j">
- <text>If X is a generic type, and an observer method declared by X is inherited by Y, and the declared type of the event parameter contains type variables declared by X, the type of the event parameter inherited in Y is the declared type, after substitution of actual type arguments declared by Y or any intermediate class that is a subclass of X and a superclass of Y.</text>
- </assertion>
</section>
<section id="4.3" title="Specialization">
14 years