[webbeans-commits] Webbeans SVN: r2806 - in tck/trunk/impl/src/main: resources and 1 other directory.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Wed Jun 10 07:42:30 EDT 2009
Author: pete.muir at jboss.org
Date: 2009-06-10 07:42:30 -0400 (Wed, 10 Jun 2009)
New Revision: 2806
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextIntegrationTest.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyedInstanceReturnedByGetTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetOnInactiveContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetWithNoCreationalContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/InactiveContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/NormalContextTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
update tck to 20090519
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextIntegrationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextIntegrationTest.java 2009-06-10 11:16:01 UTC (rev 2805)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextIntegrationTest.java 2009-06-10 11:42:30 UTC (rev 2806)
@@ -1,47 +0,0 @@
-/*
- * 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.context;
-
-import org.hibernate.tck.annotations.SpecAssertion;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.testng.annotations.Test;
-
-/**
- *
- * Spec version: PRD2
- */
- at Artifact
- at IntegrationTest
-public class ContextIntegrationTest
-{
- @Test(groups = { "stub", "contexts", "integration" })
- @SpecAssertion(section = "8.5", id = "c")
- public void testBuiltInNormalScopedContextsDoNotPropagateAcrossRemoteMethodInvocations()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "contexts", "integration" })
- @SpecAssertion(section = "8.5", id = "c")
- public void testBuiltInNormalScopedContextsDoNotPropagateAcrossAsynchronousMethodInvocations()
- {
- assert false;
- }
-
-}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java 2009-06-10 11:16:01 UTC (rev 2805)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/ContextTest.java 2009-06-10 11:42:30 UTC (rev 2806)
@@ -18,7 +18,8 @@
/**
*
- * Spec version: PRD2
+ * Spec version: 20090519
+ *
*/
@Artifact
public class ContextTest extends AbstractJSR299Test
@@ -59,7 +60,7 @@
}
@Test(expectedExceptions = { IllegalStateException.class }, groups = { "manager" })
- @SpecAssertion(section = "8.6", id = "d")
+ @SpecAssertion(section = "6.5.1", id = "b")
public void testGetContextWithTooManyActiveContextsFails()
{
Context firstContext = new DummyContext()
@@ -74,25 +75,15 @@
}
@Test(expectedExceptions = { ContextNotActiveException.class }, groups = { "manager" })
- @SpecAssertion(section = "8.6", id = "c")
+ @SpecAssertion(section = "6.5.1", id = "a")
public void testGetContextWithNoRegisteredContextsFails()
{
getCurrentManager().getContext(Unregistered.class);
}
- /**
- * For each of the built-in normal scopes, contexts propagate across any Java
- * method call, including invocation of EJB local business methods.
- */
- @Test(groups = { "stub", "contexts", "underInvestigation" })
- @SpecAssertion(section = "8.5", id = "b")
- public void testBuiltInNormalScopedContextsPropagateAcrossAnyJavaMethodCall()
- {
- assert false;
- }
-
@Test(groups = { "contexts" })
- @SpecAssertion(section = "8.5", id = "a")
+ @SpecAssertion(section = "unknown", id = "unknown")
+ //@SpecAssertion(section = "8.5", id = "a")
public void testBuiltInContexts()
{
Context context = getCurrentManager().getContext(Dependent.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyedInstanceReturnedByGetTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyedInstanceReturnedByGetTest.java 2009-06-10 11:16:01 UTC (rev 2805)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyedInstanceReturnedByGetTest.java 2009-06-10 11:42:30 UTC (rev 2806)
@@ -9,11 +9,16 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: 20090519
+ *
+ */
@Artifact
public class DestroyedInstanceReturnedByGetTest extends AbstractJSR299Test
{
@Test(groups = { "contexts" })
- @SpecAssertion(section = "8.1", id = "g")
+ @SpecAssertion(section = "6.2", id = "q")
public void testDestroyedInstanceMustNotBeReturnedByGet()
{
Bean<MySessionBean> mySessionBean = getBeans(MySessionBean.class).iterator().next();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetOnInactiveContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetOnInactiveContextTest.java 2009-06-10 11:16:01 UTC (rev 2805)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetOnInactiveContextTest.java 2009-06-10 11:42:30 UTC (rev 2806)
@@ -14,7 +14,7 @@
public class GetOnInactiveContextTest extends AbstractJSR299Test
{
@Test(groups = { "contexts" }, expectedExceptions = { ContextNotActiveException.class })
- @SpecAssertion(section = "8.1", id = "h")
+ @SpecAssertion(section = "6.2", id = "m")
public void testInvokingGetOnInactiveContextFails()
{
Context sessionContext = getCurrentManager().getContext(SessionScoped.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetTest.java 2009-06-10 11:16:01 UTC (rev 2805)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetTest.java 2009-06-10 11:42:30 UTC (rev 2806)
@@ -11,11 +11,16 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: 20090519
+ *
+ */
@Artifact
public class GetTest extends AbstractJSR299Test
{
@Test(groups = { "contexts" })
- @SpecAssertion(section = "8.1", id = "e")
+ @SpecAssertion(section = "6.2", id = "o")
public void testGetMayNotCreateNewInstanceUnlessCreationalContextGiven()
{
Contextual<MySessionBean> mySessionBean = getBeans(MySessionBean.class).iterator().next();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetWithNoCreationalContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetWithNoCreationalContextTest.java 2009-06-10 11:16:01 UTC (rev 2805)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/GetWithNoCreationalContextTest.java 2009-06-10 11:42:30 UTC (rev 2806)
@@ -4,15 +4,24 @@
import javax.enterprise.context.spi.Contextual;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: 20090519
+ *
+ */
@Artifact
public class GetWithNoCreationalContextTest extends AbstractJSR299Test
{
@Test(groups = { "contexts" })
- @SpecAssertion(section = "8.1", id = "b")
+ @SpecAssertions({
+ @SpecAssertion(section = "6.2", id = "na"),
+ @SpecAssertion(section = "6.2", id = "k")
+ })
public void testGetWithoutCreationalContextReturnsNull()
{
Contextual<MySessionBean> mySessionBean = getBeans(MySessionBean.class).iterator().next();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/InactiveContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/InactiveContextTest.java 2009-06-10 11:16:01 UTC (rev 2805)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/InactiveContextTest.java 2009-06-10 11:42:30 UTC (rev 2806)
@@ -8,13 +8,18 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.testng.annotations.Test;
+/**
+ *
+ * Spec version: 20090519
+ *
+ */
@Artifact
public class InactiveContextTest extends AbstractJSR299Test
{
@Test(expectedExceptions = { ContextNotActiveException.class }, groups = { "manager" })
- @SpecAssertion(section = "8.6", id = "c")
+ @SpecAssertion(section = "6.2", id = "m")
public void testGetContextWithNoActiveContextsFails()
{
getCurrentConfiguration().getContexts().setInactive(getCurrentConfiguration().getContexts().getRequestContext());
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/NormalContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/NormalContextTest.java 2009-06-10 11:16:01 UTC (rev 2805)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/NormalContextTest.java 2009-06-10 11:42:30 UTC (rev 2806)
@@ -15,7 +15,7 @@
/**
* This class tests a basic context against section 8 of the specification
*
- * Spec version: PRD2
+ * Spec version: 20090519
*
* @author Nicklas Karlsson
* @author Pete Muir
@@ -27,8 +27,8 @@
@Test(groups = { "contexts" })
@SpecAssertions( {
- @SpecAssertion(section = "8.1", id = "a"),
- @SpecAssertion(section = "8.2", id = "c")
+ @SpecAssertion(section = "6.2", id = "j"),
+ @SpecAssertion(section = "6.3", id = "c")
} )
public void testGetReturnsExistingInstance()
{
@@ -42,7 +42,7 @@
@Test(groups = { "contexts" })
@SpecAssertions( {
- @SpecAssertion(section = "8.1", id = "c")
+ @SpecAssertion(section = "6.2", id = "l")
} )
public void testGetWithCreationalContextReturnsNewInstance()
{
@@ -57,8 +57,8 @@
}
@Test(groups = { "contexts" })
- @SpecAssertion(section = "8.1", id = "d")
- public void testGetMayNotReturnNullUnlessNoCreationalContextOrContextualCreateReturnsNull()
+ @SpecAssertion(section = "6.2", id = "nb")
+ public void testGetMayNotReturnNullUnlessContextualCreateReturnsNull()
{
// The case of no creational context is already tested where a null is
// returned. Here we just test that the contextual create can return null.
@@ -73,10 +73,8 @@
@Test(groups = { "contexts" })
@SpecAssertions( {
- @SpecAssertion(section = "6", id = "i"),
- @SpecAssertion(section = "6", id = "j"),
- @SpecAssertion(section = "8.1", id = "f"),
- @SpecAssertion(section = "8.2", id = "d")
+ @SpecAssertion(section = "6.2", id = "p"),
+ @SpecAssertion(section = "6.3", id = "d")
})
public void testContextDestroysBeansWhenDestroyed()
{
@@ -96,7 +94,7 @@
@Test(groups = { "contexts" })
@SpecAssertions( {
- @SpecAssertion(section = "8.2", id = "e")
+ @SpecAssertion(section = "6.3", id = "e")
})
public void testSameNormalScopeBeanInjectedEverywhere()
{
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-06-10 11:16:01 UTC (rev 2805)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-06-10 11:42:30 UTC (rev 2806)
@@ -2546,18 +2546,26 @@
<text>If the context object is inactive, the |get()| method must throw a |ContextNotActiveException|.</text>
</assertion>
- <assertion id="n">
- <text>The |get()| method may not return a null value unless no |CreationalContext| is given, or |Contextual.create()| returns a null value.</text>
+ <assertion id="na">
+ <text>The |get()| method may not return a null value _unless no |CreationalContext| is given_, or |Contextual.create()| returns a null value.</text>
</assertion>
+ <assertion id="nb">
+ <text>The |get()| method may not return a null value unless no |CreationalContext| is given, or _|Contextual.create()| returns a null value_.</text>
+ </assertion>
+
<assertion id="o">
<text>The |get()| method may not create a new instance of the given contextual type unless a |CreationalContext| is given.</text>
</assertion>
<assertion id="p">
<text>The context object is responsible for destroying any contextual instance it creates by passing the instance to the |destroy()|
-method of the Contextual object representing the contextual type. A destroyed instance must not subsequently be returned by the |get()| method.</text>
+method of the Contextual object representing the contextual type.</text>
</assertion>
+
+ <assertion id="q">
+ <text> A destroyed instance must not subsequently be returned by the |get()| method.</text>
+ </assertion>
</section>
<section id="6.3" title="Normal scopes and pseudo-scopes">
More information about the weld-commits
mailing list