[webbeans-commits] Webbeans SVN: r1722 - in tck/trunk: impl/src/main/java/org/jboss/jsr299/tck and 1 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Thu Feb 26 11:14:07 EST 2009


Author: pete.muir at jboss.org
Date: 2009-02-26 11:14:07 -0500 (Thu, 26 Feb 2009)
New Revision: 1722

Modified:
   tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/EL.java
   tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/StandaloneContainers.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java
Log:
Remove remmanants of old infrastructure

Modified: tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/EL.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/EL.java	2009-02-26 15:46:00 UTC (rev 1721)
+++ tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/EL.java	2009-02-26 16:14:07 UTC (rev 1722)
@@ -4,13 +4,10 @@
  * This interface provides operations relating to EL.
  * 
  * The TCK porting package must provide an implementation of this interface which is 
- * suitable for the target Web Beans implementation.
+ * suitable for the target Web Beans implementation. 
  * 
- * NOTE: This interface will be removed
- * 
  * @author Pete Muir
  */
- at Deprecated
 public interface EL
 {
    

Modified: tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/StandaloneContainers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/StandaloneContainers.java	2009-02-26 15:46:00 UTC (rev 1721)
+++ tck/trunk/api/src/main/java/org/jboss/jsr299/tck/spi/StandaloneContainers.java	2009-02-26 16:14:07 UTC (rev 1722)
@@ -1,8 +1,6 @@
 package org.jboss.jsr299.tck.spi;
 
-import java.lang.annotation.Annotation;
 import java.net.URL;
-import java.util.List;
 
 import org.jboss.jsr299.tck.api.DeploymentException;
 
@@ -39,35 +37,8 @@
     * The container should be in an fully initialized state when the
     * method returns
     * 
-    * Deprecated, {@link #deploy(Iterable, Iterable)} should be used with real
-    * beans.xml files. This method will be removed when the TCK is released. 
-    * 
     * @param classes the classes to deploy
-    * @return the manager created as a result of initializing the container
     */
-   @Deprecated
-   public void deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, Iterable<Class<?>> classes) throws DeploymentException;
-   
-   /**
-    * <p>Bootstrap the container by registering Beans and Observers, raising 
-    * @Initialized event, validating the deployment, and raising the 
-    * @Deployed event.</p>
-    * 
-    * <p>Any classes passed in should be fully deployed. This includes:</p>
-    * 
-    * <ul>
-    * <li>Simple beans</li>
-    * <li>Session beans</li>
-    * <li>Producer methods and producer fields</li>
-    * <li>Observer methods</li>
-    * <li>support for Event and Instance injection points</li> 
-    * </ul>
-    * 
-    * The container should be in an fully initialized state when the
-    * method returns
-    * 
-    * @param classes the classes to deploy
-    */
    public void deploy(Iterable<Class<?>> classes) throws DeploymentException;
    
    /**

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java	2009-02-26 15:46:00 UTC (rev 1721)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java	2009-02-26 16:14:07 UTC (rev 1722)
@@ -27,7 +27,6 @@
 {
    
    private static Logger log = Logger.getLogger(AbstractDeclarativeTest.class);
-   private static final Class<?>[] EMPTY_CLASS_ARRAY = new Class<?>[0];
 
    private static boolean inContainer = false;
    
@@ -99,16 +98,8 @@
          }
          else if (artifact != null && artifact.isUnit())
          {
-            // Not a legacy test
             Set<Class<?>> classes = artifact.getClasses();
-            if (getEnabledDeploymentTypes().size() > 0)
-            {
-               getCurrentConfiguration().getStandaloneContainers().deploy(getEnabledDeploymentTypes(), classes);
-            }
-            else
-            {
-               getCurrentConfiguration().getStandaloneContainers().deploy(classes, Arrays.asList(artifact.getBeansXml().getSource()));
-            }
+            getCurrentConfiguration().getStandaloneContainers().deploy(classes, Arrays.asList(artifact.getBeansXml().getSource()));
          }
       }
       catch (IOException e)
@@ -213,30 +204,20 @@
 
    @BeforeMethod(alwaysRun=true)
    public void beforeMethod(Method method)
-   {      
-      if (!isInContainer() && artifact == null) 
-      {
-         // This is a legacy test
-         deployBeans();
-      }
+   {
       setCurrentManager(getCurrentConfiguration().getManagers().getManager());
    }
 
    @AfterMethod(alwaysRun=true)
    public void afterMethod()
    {
-      if (!isInContainer() && artifact == null) 
-      {
-         // This is a legacy test
-         getCurrentConfiguration().getStandaloneContainers().undeploy();
-      }
       setCurrentManager(null);
    }
 
 
    public void run(IHookCallBack callback, ITestResult testResult)
    {
-      if (artifact == null)
+      if (artifact == null && !isInContainer())
       {
          log.warn("Non @Artifact-test for testcase " + testResult.getMethod());
       }
@@ -247,7 +228,7 @@
 	   else if (!isDeployToContainerNeeded() && !skipTest)
       {
          callback.runTestMethod(testResult);
-         if (!getCurrentConfiguration().isStandalone())
+         if (!getCurrentConfiguration().isStandalone() && !isInContainer())
          {
             log.warn("Running testcase locally " + testResult.getMethod());
          }

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java	2009-02-26 15:46:00 UTC (rev 1721)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java	2009-02-26 16:14:07 UTC (rev 1722)
@@ -5,28 +5,16 @@
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
 
 import javax.context.Context;
-import javax.context.CreationalContext;
-import javax.inject.Production;
-import javax.inject.Standard;
 import javax.inject.manager.Manager;
 
 import org.jboss.jsr299.tck.api.Configuration;
-import org.jboss.jsr299.tck.api.DeploymentException;
 import org.jboss.jsr299.tck.impl.ConfigurationImpl;
-import org.jboss.jsr299.tck.impl.util.MockCreationalContext;
 
 public abstract class AbstractTest
 {
    
-   private static final List<Class<? extends Annotation>> STANDARD_DEPLOYMENT_TYPES = Collections.unmodifiableList(Arrays.asList(Standard.class, Production.class));
-   
    protected abstract static class RunInDependentContext
    {
    
@@ -56,89 +44,9 @@
       protected abstract void execute() throws Exception;
    
    }
-
-   /**
-    * @see RunInDependentContext
-    */
-   @Deprecated
-   protected static void activateDependentContext()
-   {
-      getCurrentConfiguration().getContexts().setActive(getCurrentConfiguration().getContexts().getDependentContext());
-   }
    
    private Manager currentManager;
    
-   /**
-    * Used to deploy simple beans in a standalone container.
-    * 
-    * 
-    * 
-    * @param classes A list of classes representing the beans to deploy
-    */
-   @Deprecated
-   protected void deployBeans(Class<?>... classes)
-   {
-      
-      if (getEnabledDeploymentTypes().size() > 0)
-      {
-         try
-         {
-            getCurrentConfiguration().getStandaloneContainers().deploy(getEnabledDeploymentTypes(), Arrays.asList(classes));
-         }
-         catch (DeploymentException e)
-         {
-            if (e.getCause() instanceof RuntimeException)
-            {
-               throw (RuntimeException) e.getCause();
-            }
-            else
-            {
-               throw new RuntimeException(e.getCause());
-            }
-         }
-      }
-      else
-      {
-         try
-         {
-            getCurrentConfiguration().getStandaloneContainers().deploy(Arrays.asList(classes));
-         }
-         catch (DeploymentException e)
-         {
-            if (e.getCause() instanceof RuntimeException)
-            {
-               throw (RuntimeException) e.getCause();
-            }
-            else
-            {
-               throw new RuntimeException(e.getCause());
-            }
-         }
-      }
-      setCurrentManager(getCurrentConfiguration().getManagers().getManager());
-   }
-   
-
-   protected final List<Class<? extends Annotation>> getStandardDeploymentTypes()
-   {
-      return new ArrayList<Class<? extends Annotation>>(STANDARD_DEPLOYMENT_TYPES);
-   }
-
-   /**
-    * This method should be overridden by test classes which need to enable
-    * additional deployment types beyond the normal ones.
-    * 
-    * Deprecated, need to use beans.xml
-    * 
-    * @return the list of enabled deployment types
-    */
-   @Deprecated
-   protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
-   {
-      return Collections.emptyList();
-   }
-   
-   
    protected void setCurrentManager(Manager currentManager)
    {
       this.currentManager = currentManager;
@@ -164,15 +72,6 @@
       return in.readObject();
    }
 
-   /**
-    * @see RunInDependentContext
-    */
-   @Deprecated
-   protected static void deactivateDependentContext()
-   {
-      getCurrentConfiguration().getContexts().setInactive(getCurrentConfiguration().getContexts().getDependentContext());
-   }
-
    protected static void setContextActive(Context context)
    {
       getCurrentConfiguration().getContexts().setActive(context);
@@ -188,12 +87,6 @@
       getCurrentConfiguration().getContexts().destroyContext(context);
    }
 
-   @Deprecated
-   public static final <T> CreationalContext<T> mockCreationalContext(Class<T> expectedType)
-   {
-      return new MockCreationalContext<T>();
-   }
-
    public AbstractTest()
    {
       super();

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java	2009-02-26 15:46:00 UTC (rev 1721)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java	2009-02-26 16:14:07 UTC (rev 1722)
@@ -1,7 +1,6 @@
 package org.jboss.jsr299.tck.unit.definition.binding;
 
 import java.lang.annotation.Annotation;
-import java.util.List;
 import java.util.Set;
 
 import javax.inject.AnnotationLiteral;
@@ -23,14 +22,6 @@
 public class BindingDefinitionTest extends AbstractDeclarativeTest
 {
 
-   @Override
-   protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
-   {
-      List<Class<? extends Annotation>> deploymentTypes = super.getStandardDeploymentTypes();
-      deploymentTypes.add(AnotherDeploymentType.class);
-      return deploymentTypes;
-   }
-
    @Test
    @SpecAssertion(section = "2.3.1", id = "a") 
    public void testDefaultBindingDeclaredInJava()




More information about the weld-commits mailing list