[webbeans-commits] Webbeans SVN: r2838 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup: el and 6 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Tue Jun 16 17:26:33 EDT 2009


Author: dallen6
Date: 2009-06-16 17:26:33 -0400 (Tue, 16 Jun 2009)
New Revision: 2838

Removed:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/noninstance/
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/notypeparam/
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/typevariable/
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/wildcard/
Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInjectionPointBean.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/nullableBean/NullableBeanTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java
Log:
Additional updates for spec version 05192009 in TCK

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java	2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/DynamicLookupTest.java	2009-06-16 21:26:33 UTC (rev 2838)
@@ -16,14 +16,15 @@
  * Tests for dynamic lookup features
  * 
  * @author Shane Bryzak
+ * 
+ * Spec version: 05192009
  */
 @Artifact
 public class DynamicLookupTest extends AbstractJSR299Test
 {
-   @Test
+   @Test(groups = "ri-broken")
    @SpecAssertions({
-      @SpecAssertion(section = "5.8", id ="a"),
-      @SpecAssertion(section = "5.8", id ="f")
+      @SpecAssertion(section = "5.5", id ="aa")
    })
    public void testObtainsInjectsInstanceOfInstance()
    {
@@ -35,11 +36,11 @@
       assert injectionPoint.getPaymentProcessor() instanceof Instance;
    }
    
-   @Test
+   @Test(groups = "ri-broken")
    @SpecAssertions({
-      @SpecAssertion(section = "5.8", id ="b"),
-      @SpecAssertion(section = "5.8", id ="c"),
-      @SpecAssertion(section = "5.8", id ="q")
+      @SpecAssertion(section = "5.5", id ="b"),
+      @SpecAssertion(section = "5.5", id ="c"),
+      @SpecAssertion(section = "5.5.1", id ="a")
    })
    public void testDynamicLookup()
    {
@@ -51,8 +52,8 @@
       assert injectionPoint.getPaymentProcessor().get() instanceof ChequePaymentProcessor;      
    }   
    
-   @Test(expectedExceptions = DuplicateBindingTypeException.class)
-   @SpecAssertion(section = "5.8", id ="d")   
+   @Test(groups = "ri-broken", expectedExceptions = DuplicateBindingTypeException.class)
+   @SpecAssertion(section = "5.5.1", id ="d")   
    public void testDuplicateBindingsThrowsException()
    {
       Bean<ObtainsInjectionPointBean> injectionPointBean = 
@@ -63,8 +64,8 @@
       injectionPoint.getPaymentProcessor().get(new PayByBinding() { public PaymentMethod value() { return CHEQUE; }});      
    }      
    
-   @Test(expectedExceptions = IllegalArgumentException.class)
-   @SpecAssertion(section = "5.8", id = "e")
+   @Test(groups = "ri-broken", expectedExceptions = IllegalArgumentException.class)
+   @SpecAssertion(section = "5.5.1", id = "e")
    public void testNonBindingThrowsException()
    {
       Bean<ObtainsInjectionPointBean> injectionPointBean = 

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInjectionPointBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInjectionPointBean.java	2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dynamic/ObtainsInjectionPointBean.java	2009-06-16 21:26:33 UTC (rev 2838)
@@ -3,11 +3,10 @@
 import static org.jboss.jsr299.tck.tests.lookup.dynamic.PayBy.PaymentMethod.CHEQUE;
 
 import javax.enterprise.inject.Instance;
-import javax.inject.Obtains;
 
 class ObtainsInjectionPointBean
 {
-   @Obtains @PayBy(CHEQUE) Instance<PaymentProcessor> paymentProcessor;   
+   @PayBy(CHEQUE) Instance<PaymentProcessor> paymentProcessor;   
    
    public Instance<PaymentProcessor> getPaymentProcessor()
    {

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java	2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/ResolutionByNameTest.java	2009-06-16 21:26:33 UTC (rev 2838)
@@ -13,27 +13,27 @@
 
 /**
  * 
- * Spec version: PRD2
+ * Spec version: 05192009
  *
  */
 @Artifact
 public class ResolutionByNameTest extends AbstractJSR299Test
 {
    
-   @Test(groups={"stub", "el"})  @SpecAssertion(section="5.10", id = "ab")
+   @Test(groups={"stub", "el"})  @SpecAssertion(section="5.6", id = "aba")
    public void testELResolverRegisteredWithJsf()
    {
       assert false;
    }
    
-   @Test(groups={"stub", "el"})  @SpecAssertion(section="5.10", id = "aa")
+   @Test(groups={"stub", "el"})  @SpecAssertion(section="5.6", id = "aaa")
    public void testELResolverRegisteredWithServlet()
    {
       assert false;
    }
    
    @Test
-   @SpecAssertion(section="5.10", id="c")
+   @SpecAssertion(section="5.6", id="c")
    public void testQualifiedNameLookup()
    {
       assert getCurrentConfiguration().getEl().evaluateValueExpression("#{javax.context.conversation}", Conversation.class) != null;
@@ -42,7 +42,8 @@
 
    @Test(groups = "beanLifecycle")
    @SpecAssertions({
-      @SpecAssertion(section = "6", id = "h")
+      @SpecAssertion(section = "5.6", id = "bc"),
+      @SpecAssertion(section = "6.5.2", id = "a")
    })
    public void testContextCreatesNewInstanceForInjection()
    {

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java	2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java	2009-06-16 21:26:33 UTC (rev 2838)
@@ -10,7 +10,7 @@
 
 /**
  * 
- * Spec version: PRD2
+ * Spec version: 05192009
  *
  */
 @Artifact

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/nullableBean/NullableBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/nullableBean/NullableBeanTest.java	2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/nullableBean/NullableBeanTest.java	2009-06-16 21:26:33 UTC (rev 2838)
@@ -8,6 +8,10 @@
 import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
 import org.testng.annotations.Test;
 
+/**
+ * 
+ * Spec version: 05192009
+ */
 @Artifact
 @ExpectedDeploymentException(NullableDependencyException.class)
 public class NullableBeanTest extends AbstractJSR299Test

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java	2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/InjectionPointTest.java	2009-06-16 21:26:33 UTC (rev 2838)
@@ -20,7 +20,6 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
-import java.util.HashSet;
 import java.util.Set;
 
 import javax.enterprise.context.Dependent;
@@ -41,14 +40,14 @@
  * 
  * @author David Allen
  * 
- * Spec version: PRD2
+ * Spec version: 05192009
  */
 @Artifact
 public class InjectionPointTest extends AbstractJSR299Test
 {
 
    @Test(groups = { "injectionPoint" })
-   @SpecAssertion(section = "5.4.9", id = "a")
+   @SpecAssertion(section = "5.4.9", id = "aa")
    public void testGetBean() throws Exception
    {
 
@@ -195,4 +194,82 @@
          }
       }.run();
    }
+
+   @Test(groups = { "injectionPoint" })
+   @SpecAssertions({
+      @SpecAssertion(section = "5.4.9", id = "e"),
+      @SpecAssertion(section = "2.5.1", id="a")
+   })
+   public void testStandardDeployment() throws Exception
+   {
+      new RunInDependentContext()
+      {
+         
+         @Override
+         protected void execute() throws Exception
+         {
+            assert getBeans(InjectionPoint.class).size() == 1;
+            assert getBeans(InjectionPoint.class).iterator().next().getDeploymentType().equals(Standard.class);
+         }
+         
+      }.run();
+   }
+
+   @Test(groups = { "injectionPoint" })
+   @SpecAssertion(section = "5.4.9", id = "e")
+   public void testDependentScope() throws Exception
+   {
+      new RunInDependentContext()
+      {
+         
+         @Override
+         protected void execute() throws Exception
+         {
+            assert getBeans(InjectionPoint.class).size() == 1;
+            assert getBeans(InjectionPoint.class).iterator().next().getScopeType().equals(Dependent.class);
+         }
+         
+      }.run();
+   }
+
+   @Test(groups = { "injectionPoint" })
+   @SpecAssertions({
+      @SpecAssertion(section = "5.4.9", id = "e")
+   })
+   public void testApiTypeInjectionPoint()  throws Exception
+   {
+      // Get an instance of the bean which has another bean injected into it
+      new RunInDependentContext()
+      {
+         
+         @Override
+         protected void execute() throws Exception
+         {
+            FieldInjectionPointBean beanWithInjectedBean = getInstanceByType(FieldInjectionPointBean.class,new CurrentLiteral());
+            BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+            assert beanWithInjectionPoint.getInjectedMetadata() != null;
+            assert InjectionPoint.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getClass());
+         }
+      }.run();
+   }
+
+   @Test(groups = { "injectionPoint" })
+   @SpecAssertions({
+      @SpecAssertion(section = "5.4.9", id = "e")
+   })
+   public void testCurrentBinding() throws Exception
+   {
+      // Get an instance of the bean which has another bean injected into it
+      new RunInDependentContext()
+      {
+         @Override
+         protected void execute() throws Exception
+         {
+            FieldInjectionPointBean beanWithInjectedBean = getInstanceByType(FieldInjectionPointBean.class,new CurrentLiteral());
+            BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+            assert beanWithInjectionPoint.getInjectedMetadata() != null;
+            assert beanWithInjectionPoint.getInjectedMetadata().getBindings().contains(new CurrentLiteral());
+         }
+      }.run();
+   }
 }

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java	2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java	2009-06-16 21:26:33 UTC (rev 2838)
@@ -15,7 +15,7 @@
 
 /**
  * 
- * Spec version: PRD2
+ * Spec version: 05192009
  *
  */
 @Artifact

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java	2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/jndi/ManagerTest.java	2009-06-16 21:26:33 UTC (rev 2838)
@@ -9,6 +9,11 @@
 import org.jboss.testharness.impl.packaging.IntegrationTest;
 import org.testng.annotations.Test;
 
+/**
+ * 
+ * Spec version: 05192009
+ *
+ */
 @Artifact
 @IntegrationTest
 public class ManagerTest extends AbstractJSR299Test

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java	2009-06-15 21:54:59 UTC (rev 2837)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java	2009-06-16 21:26:33 UTC (rev 2838)
@@ -20,7 +20,7 @@
 
 /**
  * 
- * Spec version: PRD2
+ * Spec version: 05192009
  *
  */
 @Artifact




More information about the weld-commits mailing list