[webbeans-commits] Webbeans SVN: r1453 - ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting and 22 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Sun Feb 8 12:02:05 EST 2009


Author: pete.muir at jboss.org
Date: 2009-02-08 12:02:04 -0500 (Sun, 08 Feb 2009)
New Revision: 1453

Added:
   ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/ELImpl.java
   ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/StandaloneContainersImpl.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Configuration.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/InContainerTestLauncher.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCK.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/EL.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/ConfigurationImpl.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/PropertiesBasedConfigurationImpl.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/ServletInContainerTestLauncher.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/packaging/ArtifactGenerator.java
Removed:
   ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/ContainersImpl.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCKConfiguration.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TestSuite.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/WebBeansTCK.java
   tck/trunk/impl/src/test/java/org/jboss/webbeans/tck/impl/test/packaging/artifactScanner/
   tck/trunk/impl/src/test/java/org/jboss/webbeans/tck/impl/test/packaging/declarativeArtifact/unspecified/
   tck/trunk/impl/src/test/java/org/jboss/webbeans/tck/impl/test/packaging/subpackages/
   tck/trunk/impl/src/test/java/org/jboss/webbeans/tck/test/impl/InContainerTestRunnerTest.java
Modified:
   ri/trunk/porting-package/pom.xml
   ri/trunk/porting-package/src/main/resources/META-INF/web-beans-tck.properties
   tck/trunk/api/pom.xml
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/Containers.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/StandaloneContainers.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/helpers/ForwardingContainers.java
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/helpers/ForwardingStandaloneContainers.java
   tck/trunk/impl/pom.xml
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/AbstractTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/InContainerTestRunner.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/util/DeploymentProperties.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/runner/TestRunner.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/runner/servlet/ServletTestRunner.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/CustomDeploymentTypeTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DefaultDeploymentTypeTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/broken/TooManyDeploymentTypesTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/clientProxy/ClientProxyTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/injection/InjectionTest.java
Log:
Much better configuration system for TCK, clean up TCK SPI and API

Modified: ri/trunk/porting-package/pom.xml
===================================================================
--- ri/trunk/porting-package/pom.xml	2009-02-08 15:03:03 UTC (rev 1452)
+++ ri/trunk/porting-package/pom.xml	2009-02-08 17:02:04 UTC (rev 1453)
@@ -31,7 +31,6 @@
        <dependency>
          <groupId>javax.el</groupId>
          <artifactId>el-ri</artifactId>
-         <scope>test</scope>
       </dependency>
       
    </dependencies>

Deleted: ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/ContainersImpl.java
===================================================================
--- ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/ContainersImpl.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/ContainersImpl.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,60 +0,0 @@
-package org.jboss.webbeans.porting;
-
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.util.List;
-
-import javax.el.ELContext;
-import javax.inject.manager.Manager;
-
-import org.jboss.webbeans.ManagerImpl;
-import org.jboss.webbeans.mock.MockBootstrap;
-import org.jboss.webbeans.mock.MockWebBeanDiscovery;
-import org.jboss.webbeans.mock.el.EL;
-import org.jboss.webbeans.tck.spi.StandaloneContainers;
-
-public class ContainersImpl implements StandaloneContainers
-{
-   
-   public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, Class<?>... classes)
-   {
-      MockBootstrap bootstrap = new MockBootstrap();
-      ManagerImpl manager = bootstrap.getManager();
-      if (enabledDeploymentTypes != null)
-      {
-         manager.setEnabledDeploymentTypes(enabledDeploymentTypes);
-      }
-      bootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(classes));
-      bootstrap.boot();
-      return manager;
-   }
-   
-   public Manager deploy(java.lang.Class<?>... classes) 
-   {
-      return deploy(null, classes);
-   }
-   
-   public Manager deploy(InputStream archive)
-   {
-      throw new UnsupportedOperationException();
-   }
-   
-   public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, InputStream archive)
-   {
-      throw new UnsupportedOperationException();
-   }
-   
-   @SuppressWarnings("unchecked")
-   public <T> T evaluateValueExpression(String expression, Class<T> expectedType)
-   {
-      ELContext elContext = EL.createELContext();
-      return (T) EL.EXPRESSION_FACTORY.createValueExpression(elContext, expression, expectedType).getValue(elContext);
-   }
- 
-   @SuppressWarnings("unchecked")
-   public <T> T evaluateMethodExpression(String expression, Class<T> expectedType, Class<?>[] expectedParamTypes, Object[] expectedParams)
-   {
-      ELContext elContext = EL.createELContext();
-      return (T) EL.EXPRESSION_FACTORY.createMethodExpression(elContext, expression, expectedType, expectedParamTypes).invoke(elContext, expectedParams);
-   }
-}

Added: ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/ELImpl.java
===================================================================
--- ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/ELImpl.java	                        (rev 0)
+++ ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/ELImpl.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -0,0 +1,25 @@
+package org.jboss.webbeans.porting;
+
+import javax.el.ELContext;
+
+import org.jboss.webbeans.mock.el.EL;
+
+public class ELImpl implements org.jboss.webbeans.tck.spi.EL
+{
+   
+   
+   @SuppressWarnings("unchecked")
+   public <T> T evaluateValueExpression(String expression, Class<T> expectedType)
+   {
+      ELContext elContext = EL.createELContext();
+      return (T) EL.EXPRESSION_FACTORY.createValueExpression(elContext, expression, expectedType).getValue(elContext);
+   }
+ 
+   @SuppressWarnings("unchecked")
+   public <T> T evaluateMethodExpression(String expression, Class<T> expectedType, Class<?>[] expectedParamTypes, Object[] expectedParams)
+   {
+      ELContext elContext = EL.createELContext();
+      return (T) EL.EXPRESSION_FACTORY.createMethodExpression(elContext, expression, expectedType, expectedParamTypes).invoke(elContext, expectedParams);
+   }
+   
+}


Property changes on: ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/ELImpl.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/StandaloneContainersImpl.java (from rev 1445, ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/ContainersImpl.java)
===================================================================
--- ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/StandaloneContainersImpl.java	                        (rev 0)
+++ ri/trunk/porting-package/src/main/java/org/jboss/webbeans/porting/StandaloneContainersImpl.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -0,0 +1,34 @@
+package org.jboss.webbeans.porting;
+
+import java.lang.annotation.Annotation;
+import java.util.List;
+
+import javax.inject.manager.Manager;
+
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.mock.MockBootstrap;
+import org.jboss.webbeans.mock.MockWebBeanDiscovery;
+import org.jboss.webbeans.tck.spi.StandaloneContainers;
+
+public class StandaloneContainersImpl implements StandaloneContainers
+{
+   
+   public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, Class<?>... classes)
+   {
+      MockBootstrap bootstrap = new MockBootstrap();
+      ManagerImpl manager = bootstrap.getManager();
+      if (enabledDeploymentTypes != null)
+      {
+         manager.setEnabledDeploymentTypes(enabledDeploymentTypes);
+      }
+      bootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(classes));
+      bootstrap.boot();
+      return manager;
+   }
+   
+   public Manager deploy(java.lang.Class<?>... classes) 
+   {
+      return deploy(null, classes);
+   }
+   
+}

Modified: ri/trunk/porting-package/src/main/resources/META-INF/web-beans-tck.properties
===================================================================
--- ri/trunk/porting-package/src/main/resources/META-INF/web-beans-tck.properties	2009-02-08 15:03:03 UTC (rev 1452)
+++ ri/trunk/porting-package/src/main/resources/META-INF/web-beans-tck.properties	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,4 +1,5 @@
 org.jboss.webbeans.tck.spi.Managers=org.jboss.webbeans.porting.ManagersImpl
 org.jboss.webbeans.tck.spi.Beans=org.jboss.webbeans.porting.BeansImpl
 org.jboss.webbeans.tck.spi.Contexts=org.jboss.webbeans.porting.ContextsImpl
-org.jboss.webbeans.tck.spi.Containers=org.jboss.webbeans.porting.ContainersImpl
\ No newline at end of file
+org.jboss.webbeans.tck.spi.StandaloneContainers=org.jboss.webbeans.porting.StandaloneContainersImpl
+org.jboss.webbeans.tck.spi.EL=org.jboss.webbeans.porting.ELImpl
\ No newline at end of file

Modified: tck/trunk/api/pom.xml
===================================================================
--- tck/trunk/api/pom.xml	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/api/pom.xml	2009-02-08 17:02:04 UTC (rev 1453)
@@ -38,6 +38,11 @@
          <groupId>org.jboss.webbeans</groupId>
          <artifactId>webbeans-api</artifactId>
       </dependency>
+      <dependency>
+      	<groupId>org.testng</groupId>
+      	<artifactId>testng</artifactId>
+      	<classifier>jdk15</classifier>
+      </dependency>
 
    </dependencies>
 

Copied: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Configuration.java (from rev 1445, tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TestSuite.java)
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Configuration.java	                        (rev 0)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Configuration.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -0,0 +1,86 @@
+package org.jboss.webbeans.tck.api;
+
+import java.util.List;
+
+import javax.context.Context;
+
+import org.jboss.webbeans.tck.spi.Beans;
+import org.jboss.webbeans.tck.spi.Containers;
+import org.jboss.webbeans.tck.spi.Contexts;
+import org.jboss.webbeans.tck.spi.EL;
+import org.jboss.webbeans.tck.spi.Managers;
+import org.jboss.webbeans.tck.spi.StandaloneContainers;
+
+public interface Configuration
+{
+   
+   public static final String OUTPUT_DIRECTORY_PROPERTY_NAME = "org.jboss.webbeans.tck.outputDirectory";
+   public static final String STANDALONE_PROPERTY_NAME = "org.jboss.webbeans.tck.standalone";
+   public static final String RUN_INTEGRATION_TESTS_PROPERTY_NAME = "org.jboss.webbeans.tck.runIntegrationTests";
+   public static final String DEPLOYMENT_DELAY_PROPERTY_NAME = "org.jboss.webbeans.tck.deploymentDelay";
+   public static final String WRITE_DEPLOYED_ARCHIVES_TO_DISK_PROPERTY_NAME = "org.jboss.webbeans.tck.writeDeployedArchivesToDisk";
+   public static final String LIBRARY_DIRECTORY_PROPERTY_NAME = "org.jboss.webbeans.tck.outputDirectory";
+   public static final String DEFAULT_OUTPUT_DIRECTORY = System.getProperty("java.io.tmpdir") + "/jsr-299-tck/";
+   public static final boolean DEFAULT_STANDALONE = true;
+   public static final boolean DEFAULT_RUN_INTEGRATION_TESTS = false;
+   public static final int DEFAULT_DEPLOYMENT_DELAY = 5000;
+   public static final boolean DEFAULT_WRITE_DEPLOYED_ARCHIVES_TO_DISK = false;
+   public static final String DEFAULT_LIBRARY_DIRECTORY = null;
+   
+   public String getOutputDirectory();
+   
+   public boolean isStandalone();
+   
+   public int getDeploymentDelay();
+   
+   public boolean isWriteDeployedArchivesToDisk();
+   
+   public String getLibraryDirectory();
+   
+   public InContainerTestLauncher getInContainerTestLauncher();
+   
+   public Beans getBeans();
+   
+   public <T extends Context> Contexts<T> getContexts();
+   
+   public Managers getManagers();
+   
+   public Containers getContainers();
+   
+   public boolean isRunIntegrationTests();
+
+   public void setOutputDirectory(String outputDirectory);
+
+   public void setStandalone(boolean standalone);
+
+   public void setDeploymentDelay(int deploymentDelay);
+
+   public void setWriteDeployedArchivesToDisk(boolean writeDeployedArchivesToDisk);
+
+   public void setLibraryDirectory(String libraryDir);
+
+   public void setInContainerTestLauncher(InContainerTestLauncher inContainerTestLauncher);
+
+   public void setBeans(Beans beans);
+
+   public <T extends Context> void setContexts(Contexts<T> contexts);
+
+   public void setManagers(Managers managers);
+
+   public void setContainers(Containers containers);
+   
+   public StandaloneContainers getStandaloneContainers();
+   
+   public void setStandaloneContainers(StandaloneContainers standaloneContainers);
+
+   public void setRunIntegrationTests(boolean runIntegrationTests);
+   
+   public List<String> getInContainerTestPackageNames();
+   
+   public List<String> getStandaloneTestPackageNames();
+   
+   public void setEL(EL el);
+   
+   public EL getEL();
+   
+}
\ No newline at end of file


Property changes on: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Configuration.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/InContainerTestLauncher.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/InContainerTestLauncher.java	                        (rev 0)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/InContainerTestLauncher.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.tck.api;
+
+import org.testng.ITestNGMethod;
+import org.testng.ITestResult;
+
+public interface InContainerTestLauncher
+{
+   
+   public static final String PROPERTY_NAME = InContainerTestLauncher.class.getName();
+   
+   public interface TestResult
+   {
+      
+      public ITestResult getResult();
+      
+      public ITestNGMethod getMethod();
+      
+   }
+   
+   public Iterable<TestResult> launchTest(Class<?> testClass) throws Exception;
+   
+}


Property changes on: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/InContainerTestLauncher.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCK.java (from rev 1445, tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/WebBeansTCK.java)
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCK.java	                        (rev 0)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCK.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -0,0 +1,65 @@
+package org.jboss.webbeans.tck.api;
+
+
+
+/**
+ * Programmatic TCK control
+ * 
+ * @author Pete Muir
+ *
+ */
+public abstract class TCK
+{
+   
+   public static final String DUMP_ARTIFACTS_PROPERTY_NAME = "dumpArtifacts";
+   
+   /**
+    * Obtain an instance of the TCK
+    * 
+    * @param configuration
+    *           the TCK configuration; if null, the TCK should try to load
+    *           configuration from system properties and
+    *           web-beans-tck.properties
+    * @return
+    */
+   public static final TCK newInstance()
+   {
+      TCK tCK;
+      try
+      {
+         tCK = (TCK) Class.forName("org.jboss.webbeans.tck.impl.WebBeansTCKImpl").newInstance();
+      }
+      catch (InstantiationException e)
+      {
+         throw new IllegalStateException("WebBeansTCK cannot be run unless webbeans-tck-impl.jar is on the classpath", e);
+      }
+      catch (IllegalAccessException e)
+      {
+         throw new IllegalStateException("WebBeansTCK cannot be run unless webbeans-tck-impl.jar is on the classpath", e);
+      }
+      catch (ClassNotFoundException e)
+      {
+         throw new IllegalStateException("WebBeansTCK cannot be run unless webbeans-tck-impl.jar is on the classpath", e);
+      }      
+      return tCK;
+   }
+   
+   public static void main(String[] args)
+   {
+      if (System.getProperty(DUMP_ARTIFACTS_PROPERTY_NAME) != null && Boolean.valueOf(System.getProperty(DUMP_ARTIFACTS_PROPERTY_NAME)) != null && Boolean.valueOf(System.getProperty(DUMP_ARTIFACTS_PROPERTY_NAME)))
+      {
+         TCK tck = newInstance();
+         tck.dumpArtifacts();
+      }
+   }
+
+   protected TCK()
+   {
+   }
+   
+   public abstract void dumpArtifacts(); 
+
+   
+   public abstract Configuration getConfiguration();
+   
+}


Property changes on: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCK.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Deleted: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCKConfiguration.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCKConfiguration.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TCKConfiguration.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,72 +0,0 @@
-package org.jboss.webbeans.tck.api;
-
-import javax.context.Context;
-
-import org.jboss.webbeans.tck.spi.Beans;
-import org.jboss.webbeans.tck.spi.Containers;
-import org.jboss.webbeans.tck.spi.Contexts;
-import org.jboss.webbeans.tck.spi.Managers;
-
-
-public class TCKConfiguration
-{
-   
-   public static final TCKConfiguration newInstance(Beans beans, Contexts<?> contexts, Managers managers, Containers standaloneContainers, TestSuite testSuite)
-   {
-      return new TCKConfiguration(beans, contexts, managers, standaloneContainers, testSuite);
-   }
-   
-   private Beans beans;
-   
-   private Contexts<?> contexts;
-   
-   private Managers managers;
-   
-   private TestSuite testSuite;
-   
-   private Containers containers;
-
-   protected TCKConfiguration(Beans beans, Contexts<?> contexts, Managers managers, Containers containers, TestSuite testSuite)
-   {
-      super();
-      this.beans = beans;
-      this.contexts = contexts;
-      this.managers = managers;
-      this.containers = containers;
-      if (testSuite != null)
-      {
-         this.testSuite = testSuite;
-      }
-      else
-      {
-         this.testSuite = new TestSuite();
-      }
-   }
-
-   public Beans getBeans()
-   {
-      return beans;
-   }
-
-   @SuppressWarnings("unchecked")
-   public <T extends Context> Contexts<T> getContexts()
-   {
-      return (Contexts<T>) contexts;
-   }
-
-   public Managers getManagers()
-   {
-      return managers;
-   }
-   
-   public TestSuite getTestSuite()
-   {
-      return testSuite;
-   }
-   
-   public Containers getContainers()
-   {
-      return containers;
-   }
-
-}

Deleted: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TestSuite.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TestSuite.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TestSuite.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,69 +0,0 @@
-package org.jboss.webbeans.tck.api;
-
-public class TestSuite
-{
-   
-   public static final String PROPERTY_NAME = TestSuite.class.getName();
-   
-   private String outputDirectory = System.getProperty("java.io.tmpdir") + "/jsr-299-tck/";
-   private boolean standalone = true;
-   private int deploymentDelay = 5000;
-   private boolean writeDeployedArchivesToDisk;
-   public String libraryDirectory;
-   
-   public TestSuite()
-   {
-      
-   }
-
-   public String getOutputDirectory()
-   {
-      return outputDirectory;
-   }
-   
-   public void setOutputDirectory(String outputDirectory)
-   {
-      this.outputDirectory = outputDirectory;
-   }
-   
-   public boolean isStandalone()
-   {
-      return standalone;
-   }
-   
-   public void setStandalone(boolean standalone)
-   {
-      this.standalone = standalone;
-   }
-
-   public long getDeploymentDelay()
-   {
-      return deploymentDelay;
-   }
-   
-   public void setDeploymentDelay(int deploymentDelay)
-   {
-      this.deploymentDelay = deploymentDelay;
-   }
-   
-   public boolean isWriteDeployedArchivesToDisk()
-   {
-      return writeDeployedArchivesToDisk;
-   }
-   
-   public void setWriteDeployedArchivesToDisk(boolean writeDeployedArchivesToDisk)
-   {
-      this.writeDeployedArchivesToDisk = writeDeployedArchivesToDisk;
-   }
-   
-   public String getLibraryDirectory()
-   {
-      return libraryDirectory;
-   }
-   
-   public void setLibraryDirectory(String libraryDir)
-   {
-      this.libraryDirectory = libraryDir;
-   }
-   
-}

Deleted: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/WebBeansTCK.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/WebBeansTCK.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/WebBeansTCK.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,74 +0,0 @@
-package org.jboss.webbeans.tck.api;
-
-
-/**
- * TCK runner
- * 
- * @author Pete Muir
- *
- */
-public abstract class WebBeansTCK
-{
-   
-   /**
-    * Obtain an instance of the TCK
-    * 
-    * @param configuration
-    *           the TCK configuration; if null, the TCK should try to load
-    *           configuration from system properties and
-    *           web-beans-tck.properties
-    * @return
-    */
-   public static final WebBeansTCK newInstance(TCKConfiguration configuration)
-   {
-      WebBeansTCK webBeansTCK;
-      try
-      {
-         webBeansTCK = (WebBeansTCK) Class.forName("org.jboss.webbeans.tck.impl.WebBeansTCKImpl").newInstance();
-      }
-      catch (InstantiationException e)
-      {
-         throw new IllegalStateException("WebBeansTCK cannot be run unless webbeans-tck-impl.jar is on the classpath", e);
-      }
-      catch (IllegalAccessException e)
-      {
-         throw new IllegalStateException("WebBeansTCK cannot be run unless webbeans-tck-impl.jar is on the classpath", e);
-      }
-      catch (ClassNotFoundException e)
-      {
-         throw new IllegalStateException("WebBeansTCK cannot be run unless webbeans-tck-impl.jar is on the classpath", e);
-      }
-      webBeansTCK.configure(configuration);      
-      return webBeansTCK;
-   }
-   
-   /**
-    * Run the whole TCK
-    */
-   public final boolean run()
-   {            
-      // Load Configuration and run
-      return runUnitTests();
-   }
-   
-   public static void main(String[] args)
-   {
-      newInstance(null).run();
-   }
-   
-   protected WebBeansTCK()
-   {
-   }
-   
-   protected abstract boolean runUnitTests();
-   
-   /**
-    * Configure the TCK
-    * 
-    * @param configuration if null, the TCK should try to load
-    *           configuration from system properties and
-    *           web-beans-tck.properties
-    */
-   protected abstract void configure(TCKConfiguration configuration);
-   
-}

Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/Containers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/Containers.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/Containers.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -11,25 +11,6 @@
    
    public static final String PROPERTY_NAME = Containers.class.getName();
    
-   /**
-    * 
-    * @param <T>
-    * @param expression
-    * @param expectedType
-    * @return
-    */
-   public <T> T evaluateValueExpression(String expression, Class<T> expectedType);
-   
-   /**
-    * 
-    * @param <T>
-    * @param expression
-    * @param expectedType
-    * @param expectedParamTypes
-    * @return
-    */
-   public <T> T evaluateMethodExpression(String expression, Class<T> expectedType, Class<?>[] expectedParamTypes, Object[] expectedParams);
-   
    public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, InputStream archive);
    
    /**

Added: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/EL.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/EL.java	                        (rev 0)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/EL.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -0,0 +1,27 @@
+package org.jboss.webbeans.tck.spi;
+
+public interface EL
+{
+   
+   public static final String PROPERTY_NAME  = EL.class.getName();
+   
+   /**
+    * 
+    * @param <T>
+    * @param expression
+    * @param expectedType
+    * @return
+    */
+   public <T> T evaluateValueExpression(String expression, Class<T> expectedType);
+   
+   /**
+    * 
+    * @param <T>
+    * @param expression
+    * @param expectedType
+    * @param expectedParamTypes
+    * @return
+    */
+   public <T> T evaluateMethodExpression(String expression, Class<T> expectedType, Class<?>[] expectedParamTypes, Object[] expectedParams);
+   
+}


Property changes on: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/EL.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/StandaloneContainers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/StandaloneContainers.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/StandaloneContainers.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -6,15 +6,18 @@
 import javax.inject.manager.Manager;
 
 /**
- * Container related operations
+ * Standalone container related operations
  * 
+ * You must implement this as part of the porting package if you intend to run
+ * the TCK in standalone mode
+ * 
  * @author Pete Muir
  *
  */
-public interface StandaloneContainers extends Containers
+public interface StandaloneContainers
 {
    
-   public static final String PROPERTY_NAME = Containers.class.getName();
+   public static final String PROPERTY_NAME = StandaloneContainers.class.getName();
    
    /**
     * <p>Bootstrap the container by registering Beans and Observers, raising 

Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/helpers/ForwardingContainers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/helpers/ForwardingContainers.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/helpers/ForwardingContainers.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -19,16 +19,6 @@
       return delegate().deploy(enabledDeploymentTypes, archive);
    }
    
-   public <T> T evaluateMethodExpression(String expression, Class<T> expectedType, Class<?>[] expectedParamTypes, Object[] expectedParams)
-   {
-      return delegate().evaluateMethodExpression(expression, expectedType, expectedParamTypes, expectedParams);
-   }
-   
-   public <T> T evaluateValueExpression(String expression, Class<T> expectedType)
-   {
-      return delegate().evaluateValueExpression(expression, expectedType);
-   }
-   
    public Manager deploy(InputStream archive)
    {
       return delegate().deploy(archive);

Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/helpers/ForwardingStandaloneContainers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/helpers/ForwardingStandaloneContainers.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/spi/helpers/ForwardingStandaloneContainers.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -7,10 +7,9 @@
 
 import org.jboss.webbeans.tck.spi.StandaloneContainers;
 
-public abstract class ForwardingStandaloneContainers extends ForwardingContainers implements StandaloneContainers
+public abstract class ForwardingStandaloneContainers implements StandaloneContainers
 {
    
-   @Override
    protected abstract StandaloneContainers delegate();
    
    public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, Class<?>... classes)

Modified: tck/trunk/impl/pom.xml
===================================================================
--- tck/trunk/impl/pom.xml	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/pom.xml	2009-02-08 17:02:04 UTC (rev 1453)
@@ -85,6 +85,7 @@
    </dependencies>
 
    <build>
+   	<defaultGoal>install</defaultGoal>
       <plugins>
          <plugin>
             <groupId>org.codehaus.mojo</groupId>
@@ -206,10 +207,10 @@
                   <phase>package</phase>
                   <configuration>
                     <tasks>
-                      <java classname="org.jboss.webbeans.tck.impl.InContainerTestRunner" classpathref="maven.compile.classpath" failonerror="true" fork="true">
-                         <jvmarg line="-DcreateArtifacts=true"/>
-                         <jvmarg line="-DoutputDirectory=${project.build.directory}/jsr-299-artifacts" />
-                         <jvmarg line="-DlibraryDirectory=${libraryDirectory}" />
+                      <java classname="org.jboss.webbeans.tck.api.TCK" classpathref="maven.compile.classpath" failonerror="true" fork="true">
+                         <jvmarg line="-DdumpArtifacts=true"/>
+                         <jvmarg line="-Dorg.jboss.webbeans.tck.outputDirectory=${project.build.directory}/jsr-299-artifacts" />
+                         <jvmarg line="-Dorg.jboss.webbeans.tck.libraryDirectory=${libraryDirectory}" />
                       </java>
                       <echo>Dumped artifacts to ${project.build.directory}/jsr-299-artifacts</echo>
                     </tasks>

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/AbstractTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/AbstractTest.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/AbstractTest.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,7 +1,5 @@
 package org.jboss.webbeans.tck;
 
-import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -23,6 +21,7 @@
 import javax.inject.manager.Bean;
 import javax.inject.manager.Manager;
 
+import org.jboss.webbeans.tck.impl.ConfigurationImpl;
 import org.jboss.webbeans.tck.impl.packaging.Artifact;
 import org.jboss.webbeans.tck.impl.packaging.ArtifactDescriptor;
 import org.jboss.webbeans.tck.impl.packaging.DeclarativeArtifactProcessor;
@@ -41,12 +40,12 @@
 
       protected void setup()
       {
-         configuration().getContexts().setActive(configuration().getContexts().getDependentContext());
+         ConfigurationImpl.get().getContexts().setActive(ConfigurationImpl.get().getContexts().getDependentContext());
       }
 
       protected void cleanup()
       {
-         configuration().getContexts().setInactive(configuration().getContexts().getDependentContext());
+         ConfigurationImpl.get().getContexts().setInactive(ConfigurationImpl.get().getContexts().getDependentContext());
       }
 
       public final void run() throws Exception
@@ -77,18 +76,18 @@
    @BeforeMethod
    public final void before(Method testMethod)
    {
-      manager = configuration().getManagers().getManager();
+      manager = ConfigurationImpl.get().getManagers().getManager();
       if (getEnabledDeploymentTypes().size() > 0)
       {
-         configuration().getManagers().setEnabledDeploymentTypes(getEnabledDeploymentTypes());
+         ConfigurationImpl.get().getManagers().setEnabledDeploymentTypes(getEnabledDeploymentTypes());
       }
       else
       {
          
       }
-      containers = (StandaloneContainers) configuration().getContainers();
-      if (configuration().getTestSuite().isStandalone())
+      if (ConfigurationImpl.get().isStandalone())
       {
+         containers = ConfigurationImpl.get().getStandaloneContainers();
          Class<?> declaringClass = testMethod.getDeclaringClass();
          if (declaringClass.isAnnotationPresent(Artifact.class) || declaringClass.isAnnotationPresent(EjbArtifact.class))
          {
@@ -116,30 +115,32 @@
    @Deprecated
    public <T> Bean<T> createSimpleBean(Class<T> beanClass)
    {
-      return configuration().getBeans().createSimpleBean(beanClass);
+      return ConfigurationImpl.get().getBeans().createSimpleBean(beanClass);
    }
 
    @Deprecated
    public <T> Bean<T> createEnterpriseBean(Class<T> beanClass)
    {
-      return configuration().getBeans().createEnterpriseBean(beanClass);
+      return ConfigurationImpl.get().getBeans().createEnterpriseBean(beanClass);
    }
 
    @Deprecated
    public <T> Bean<T> createProducerMethodBean(Method method, Bean<?> producerBean)
    {
-      return configuration().getBeans().createProducerMethodBean(method, producerBean);
+      return ConfigurationImpl.get().getBeans().createProducerMethodBean(method, producerBean);
    }
 
    @Deprecated
    public <T> Bean<T> createProducerFieldBean(Field field, Bean<?> producerBean)
    {
-      return configuration().getBeans().createProducerFieldBean(field, producerBean);
+      return ConfigurationImpl.get().getBeans().createProducerFieldBean(field, producerBean);
    }
 
    /**
-    * Used to deploy simple beans in a Web container.
+    * Used to deploy simple beans in a standalone container.
     * 
+    * 
+    * 
     * @param classes A list of classes representing the beans to deploy
     */
    @Deprecated
@@ -191,7 +192,7 @@
    @Deprecated
    protected static void activateDependentContext()
    {
-      configuration().getContexts().setActive(configuration().getContexts().getDependentContext());
+      ConfigurationImpl.get().getContexts().setActive(ConfigurationImpl.get().getContexts().getDependentContext());
    }
 
    /**
@@ -200,22 +201,22 @@
    @Deprecated
    protected static void deactivateDependentContext()
    {
-      configuration().getContexts().setInactive(configuration().getContexts().getDependentContext());
+      ConfigurationImpl.get().getContexts().setInactive(ConfigurationImpl.get().getContexts().getDependentContext());
    }
 
    protected static void setContextActive(Context context)
    {
-      configuration().getContexts().setActive(context);
+      ConfigurationImpl.get().getContexts().setActive(context);
    }
 
    protected static void setContextInactive(Context context)
    {
-      configuration().getContexts().setInactive(context);
+      ConfigurationImpl.get().getContexts().setInactive(context);
    }
 
    protected static void destroyContext(Context context)
    {
-      configuration().getContexts().destroyContext(context);
+      ConfigurationImpl.get().getContexts().destroyContext(context);
    }
 
    @Deprecated

Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/ConfigurationImpl.java (from rev 1445, tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/TestSuite.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/ConfigurationImpl.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/ConfigurationImpl.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -0,0 +1,230 @@
+package org.jboss.webbeans.tck.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.context.Context;
+
+import org.jboss.webbeans.tck.api.Configuration;
+import org.jboss.webbeans.tck.api.InContainerTestLauncher;
+import org.jboss.webbeans.tck.spi.Beans;
+import org.jboss.webbeans.tck.spi.Containers;
+import org.jboss.webbeans.tck.spi.Contexts;
+import org.jboss.webbeans.tck.spi.EL;
+import org.jboss.webbeans.tck.spi.Managers;
+import org.jboss.webbeans.tck.spi.StandaloneContainers;
+
+public class ConfigurationImpl implements Configuration
+{
+   
+   public static final String INTEGRATION_TEST_PACKAGE_NAME = "org.jboss.webbeans.tck.integration";
+   public static final String UNIT_TEST_PACKAGE_NAME = "org.jboss.webbeans.tck.unit";
+   
+   private static Configuration current;
+   public static Configuration get()
+   {
+      if (ConfigurationImpl.current == null)
+      {
+         ConfigurationImpl.current = new PropertiesBasedConfigurationImpl().loadSPIImplementation();
+      }
+      return ConfigurationImpl.current;
+   }
+   
+   private String outputDirectory;
+   private boolean standalone;
+   private boolean runIntegrationTests;
+   private int deploymentDelay;
+   private boolean writeDeployedArchivesToDisk;
+   private String libraryDirectory;
+   private InContainerTestLauncher inContainerTestLauncher;
+   private Beans beans;
+   private Contexts<? extends Context> contexts;
+   private Managers managers;
+   private Containers containers;
+   private StandaloneContainers standaloneContainers;
+   private EL el;
+   private List<String> integrationTestPackageNames;
+   private List<String> unitTestPackageNames;
+   
+   protected ConfigurationImpl()
+   {
+      // TODO Auto-generated constructor stub
+   }
+   
+   public ConfigurationImpl(Configuration configuration)
+   {
+      this.outputDirectory = configuration.getOutputDirectory();
+      this.standalone = configuration.isStandalone();
+      this.runIntegrationTests = configuration.isRunIntegrationTests();
+      this.deploymentDelay = configuration.getDeploymentDelay();
+      this.writeDeployedArchivesToDisk = configuration.isWriteDeployedArchivesToDisk();
+      this.libraryDirectory = configuration.getLibraryDirectory();
+      this.inContainerTestLauncher = configuration.getInContainerTestLauncher();
+      this.beans = configuration.getBeans();
+      this.contexts = configuration.getContexts();
+      this.managers = configuration.getManagers();
+      this.containers = configuration.getContainers();
+      this.el = configuration.getEL();
+      this.standaloneContainers = configuration.getStandaloneContainers();
+   }
+
+   public String getOutputDirectory()
+   {
+      return outputDirectory;
+   }
+   
+   public void setOutputDirectory(String outputDirectory)
+   {
+      this.outputDirectory = outputDirectory;
+   }
+   
+   public boolean isStandalone()
+   {
+      return standalone;
+   }
+   
+   public void setStandalone(boolean standalone)
+   {
+      this.standalone = standalone;
+   }
+
+   public int getDeploymentDelay()
+   {
+      return deploymentDelay;
+   }
+   
+   public void setDeploymentDelay(int deploymentDelay)
+   {
+      this.deploymentDelay = deploymentDelay;
+   }
+   
+   public boolean isWriteDeployedArchivesToDisk()
+   {
+      return writeDeployedArchivesToDisk;
+   }
+   
+   public void setWriteDeployedArchivesToDisk(boolean writeDeployedArchivesToDisk)
+   {
+      this.writeDeployedArchivesToDisk = writeDeployedArchivesToDisk;
+   }
+   
+   public String getLibraryDirectory()
+   {
+      return libraryDirectory;
+   }
+   
+   public void setLibraryDirectory(String libraryDir)
+   {
+      this.libraryDirectory = libraryDir;
+   }
+   
+   public InContainerTestLauncher getInContainerTestLauncher()
+   {
+      return inContainerTestLauncher;
+   }
+   
+   public void setInContainerTestLauncher(InContainerTestLauncher inContainerTestLauncher)
+   {
+      this.inContainerTestLauncher = inContainerTestLauncher;
+   }
+
+   public Beans getBeans()
+   {
+      return beans;
+   }
+
+   public void setBeans(Beans beans)
+   {
+      this.beans = beans;
+   }
+
+   @SuppressWarnings("unchecked")
+   public <T extends Context> Contexts<T> getContexts()
+   {
+      return (Contexts<T>) contexts;
+   }
+
+   public <T extends Context> void setContexts(Contexts<T> contexts)
+   {
+      this.contexts = contexts;
+   }
+
+   public Managers getManagers()
+   {
+      return managers;
+   }
+
+   public void setManagers(Managers managers)
+   {
+      this.managers = managers;
+   }
+
+   public Containers getContainers()
+   {
+      return containers;
+   }
+
+   public void setContainers(Containers containers)
+   {
+      this.containers = containers;
+   }
+
+   public boolean isRunIntegrationTests()
+   {
+      return runIntegrationTests;
+   }
+
+   public void setRunIntegrationTests(boolean runIntegrationTests)
+   {
+      this.runIntegrationTests = runIntegrationTests;
+   }
+   
+   public List<String> getInContainerTestPackageNames()
+   {
+      if (integrationTestPackageNames == null)
+      {
+         integrationTestPackageNames = new ArrayList<String>();
+         integrationTestPackageNames.add(INTEGRATION_TEST_PACKAGE_NAME);
+         if (!isStandalone())
+         {
+            integrationTestPackageNames.add(UNIT_TEST_PACKAGE_NAME);
+         }
+      }
+      return Collections.unmodifiableList(integrationTestPackageNames);
+   }
+   
+   public List<String> getStandaloneTestPackageNames()
+   {
+      if (unitTestPackageNames == null)
+      {
+         unitTestPackageNames = new ArrayList<String>();
+         if (isStandalone())
+         {
+            unitTestPackageNames.add(UNIT_TEST_PACKAGE_NAME);
+         }
+      }
+      return Collections.unmodifiableList(unitTestPackageNames);
+   }
+   
+   public EL getEL()
+   {
+      return el;
+   }
+   
+   public void setEL(EL el)
+   {
+      this.el = el;
+   }
+   
+   public StandaloneContainers getStandaloneContainers()
+   {
+      return standaloneContainers;
+   }
+   
+   public void setStandaloneContainers(StandaloneContainers standaloneContainers)
+   {
+      this.standaloneContainers = standaloneContainers;
+   }
+   
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/ConfigurationImpl.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/InContainerTestRunner.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/InContainerTestRunner.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/InContainerTestRunner.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,22 +1,11 @@
 package org.jboss.webbeans.tck.impl;
-
-import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
-
-import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 import org.apache.log4j.Logger;
-import org.jboss.webbeans.tck.api.TestSuite;
+import org.jboss.webbeans.tck.api.Configuration;
 import org.jboss.webbeans.tck.impl.packaging.ArtifactDescriptor;
-import org.jboss.webbeans.tck.impl.packaging.ArtifactScanner;
-import org.jboss.webbeans.tck.impl.packaging.DeclarativeArtifactProcessor;
-import org.jboss.webbeans.tck.spi.Containers;
-import org.testng.ITestContext;
 
 
 public class InContainerTestRunner
@@ -24,95 +13,19 @@
    
    private static final Logger log = Logger.getLogger(InContainerTestRunner.class);
    
-   private final TestSuite testSuite;
-   private final Containers containers;
+   private final Configuration configuration;
    
    public InContainerTestRunner()
    {
-      testSuite = configuration().getTestSuite();
-      containers = configuration().getContainers();
+      configuration = new ConfigurationImpl(ConfigurationImpl.get());
    }
    
-   protected InContainerTestRunner(TestSuite testSuite, Containers containers)
+   protected InContainerTestRunner(Configuration configuration)
    {
       super();
-      this.testSuite = testSuite;
-      this.containers = containers;
+      this.configuration = configuration;
    }
-
-   public static void main(String[] args)
-   {
-      if (System.getProperty("createArtifacts") != null)
-      {
-         TestSuite testSuite = new TestSuite();
-         if (System.getProperty("outputDirectory") != null)
-         {
-            testSuite.setOutputDirectory(System.getProperty("outputDirectory"));
-         }
-         if (System.getProperty("libraryDirectory") != null)
-         {
-            testSuite.setLibraryDirectory(System.getProperty("libraryDirectory"));
-         }
-         testSuite.setStandalone(false);
-         testSuite.setWriteDeployedArchivesToDisk(true);
-         InContainerTestRunner runner = new InContainerTestRunner(testSuite, null);
-         runner.writeArtifactsOutputDirectory(runner.createArtifacts());
-      }
-   }
    
-   public void run()
-   {
-      List<ArtifactDescriptor> artifacts = createArtifacts();
-      if (testSuite.isWriteDeployedArchivesToDisk())
-      {
-         writeArtifactsOutputDirectory(artifacts);
-      }
-      deployArtifacts(artifacts);
-   }
-   
-   protected List<ArtifactDescriptor> createArtifacts()
-   {
-      Set<Class<?>> classes = new HashSet<Class<?>>();
-      classes.addAll(new ArtifactScanner("org.jboss.webbeans.tck.integration").getClasses());
-
-      if (!testSuite.isStandalone())
-      {
-         classes.addAll(new ArtifactScanner("org.jboss.webbeans.tck.unit").getClasses());
-      }
-      List<ArtifactDescriptor> artifacts = new ArrayList<ArtifactDescriptor>();
-      for (Class<?> clazz : classes)
-      {
-         artifacts.add(new DeclarativeArtifactProcessor(clazz, testSuite.isStandalone(), testSuite.getLibraryDirectory()).getArtifact());
-      }
-      return artifacts;
-   }
-   
-   protected void writeArtifactsOutputDirectory(List<ArtifactDescriptor> artifacts) 
-   {
-      File file = new File(testSuite.getOutputDirectory());
-      if (!file.exists())
-      {
-         file.mkdirs();
-      }
-      else if (file.isFile())
-      {
-         throw new IllegalStateException("Cannot use debug directory " + testSuite.getOutputDirectory() + ", it already exists");
-      }
-      log.info("Writing artifacts to " + testSuite.getOutputDirectory());
-      for (ArtifactDescriptor artifact : artifacts)
-      {
-         try
-         {
-            artifact.writeArtifactToDisk(testSuite.getOutputDirectory());
-            log.info("Written artifact to disk " + artifact);
-         }
-         catch (IOException e)
-         {
-            log.warn("Error writing artifact to disk " + artifact, e);
-         }
-      }
-   }
-   
    protected void deployArtifacts(List<ArtifactDescriptor> artifacts)
    {
       for (ArtifactDescriptor artifact : artifacts)
@@ -121,16 +34,17 @@
          {
             InputStream jar = artifact.getJar();
             
-            containers.deploy(jar);
+            configuration.getContainers().deploy(jar);
             jar.close();
             try
             {
-               Thread.sleep(testSuite.getDeploymentDelay());
+               Thread.sleep(configuration.getDeploymentDelay());
             }
             catch (InterruptedException e)
             {
                Thread.interrupted();
             }
+            
          }
          catch (IOException e) 
          {
@@ -139,9 +53,4 @@
       }
    }
    
-   private void mergeInTestReports(ITestContext context)
-   {
-      
-   }
-   
 }

Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/PropertiesBasedConfigurationImpl.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/PropertiesBasedConfigurationImpl.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/PropertiesBasedConfigurationImpl.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -0,0 +1,48 @@
+package org.jboss.webbeans.tck.impl;
+
+import javax.context.Context;
+
+import org.jboss.webbeans.tck.api.InContainerTestLauncher;
+import org.jboss.webbeans.tck.impl.util.DeploymentProperties;
+import org.jboss.webbeans.tck.spi.Beans;
+import org.jboss.webbeans.tck.spi.Containers;
+import org.jboss.webbeans.tck.spi.Contexts;
+import org.jboss.webbeans.tck.spi.EL;
+import org.jboss.webbeans.tck.spi.Managers;
+import org.jboss.webbeans.tck.spi.StandaloneContainers;
+
+public class PropertiesBasedConfigurationImpl extends ConfigurationImpl
+{
+   
+   private final DeploymentProperties deploymentProperties;
+   
+   public PropertiesBasedConfigurationImpl()
+   {
+      this.deploymentProperties = new DeploymentProperties();
+      
+      setOutputDirectory(deploymentProperties.getStringValue(OUTPUT_DIRECTORY_PROPERTY_NAME, DEFAULT_OUTPUT_DIRECTORY, false));
+      setStandalone(deploymentProperties.getBooleanValue(STANDALONE_PROPERTY_NAME, DEFAULT_STANDALONE, false));
+      setRunIntegrationTests(deploymentProperties.getBooleanValue(RUN_INTEGRATION_TESTS_PROPERTY_NAME, DEFAULT_RUN_INTEGRATION_TESTS, false));
+      setDeploymentDelay(deploymentProperties.getIntValue(DEPLOYMENT_DELAY_PROPERTY_NAME, DEFAULT_DEPLOYMENT_DELAY, false));
+      setWriteDeployedArchivesToDisk(deploymentProperties.getBooleanValue(WRITE_DEPLOYED_ARCHIVES_TO_DISK_PROPERTY_NAME, DEFAULT_WRITE_DEPLOYED_ARCHIVES_TO_DISK, false));
+      setLibraryDirectory(deploymentProperties.getStringValue(LIBRARY_DIRECTORY_PROPERTY_NAME, DEFAULT_LIBRARY_DIRECTORY, false));
+      
+   }
+   
+   public PropertiesBasedConfigurationImpl loadSPIImplementation()
+   {
+      setInContainerTestLauncher(deploymentProperties.getInstanceValue(InContainerTestLauncher.PROPERTY_NAME, InContainerTestLauncher.class, isRunIntegrationTests() || !isStandalone()));
+      setManagers(deploymentProperties.getInstanceValue(Managers.PROPERTY_NAME, Managers.class, true));
+      setContainers(deploymentProperties.getInstanceValue(Containers.PROPERTY_NAME, Containers.class, !isStandalone() || isRunIntegrationTests()));
+      setStandaloneContainers(deploymentProperties.getInstanceValue(StandaloneContainers.PROPERTY_NAME, StandaloneContainers.class, isStandalone()));
+      setBeans(deploymentProperties.getInstanceValue(Beans.PROPERTY_NAME, Beans.class, true));
+      setEL(deploymentProperties.getInstanceValue(EL.PROPERTY_NAME, EL.class, true));
+      
+      @SuppressWarnings("unchecked")      
+      Contexts<? extends Context> instanceValue = deploymentProperties.getInstanceValue(Contexts.PROPERTY_NAME, Contexts.class, true);
+      
+      setContexts(instanceValue);
+      return this;
+   }
+   
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/PropertiesBasedConfigurationImpl.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/ServletInContainerTestLauncher.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/ServletInContainerTestLauncher.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/ServletInContainerTestLauncher.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -0,0 +1,59 @@
+package org.jboss.webbeans.tck.impl;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.webbeans.tck.api.InContainerTestLauncher;
+
+public class ServletInContainerTestLauncher implements InContainerTestLauncher
+{
+   
+   private static final Logger log = Logger.getLogger(ServletInContainerTestLauncher.class);
+
+   private final String host;
+   
+   public ServletInContainerTestLauncher(String host)
+   {
+      this.host = host;
+   }
+
+   public Iterable<TestResult> launchTest(Class<?> testClass) throws Exception
+   {
+      String url = "http://" + host + "/" + testClass.getName() + "/?outputMode=serializedObject";
+      log.info("Running tests located at " + url);
+      URLConnection connection = new URL(url).openConnection();
+      if (!(connection instanceof HttpURLConnection))
+      {
+         throw new IllegalStateException("Not an http connection! " + connection);
+      }
+      HttpURLConnection httpConnection = (HttpURLConnection) connection;
+      httpConnection.connect();
+      if (httpConnection.getResponseCode() == HttpURLConnection.HTTP_OK)
+      {
+         Object o = new ObjectInputStream(httpConnection.getInputStream()).readObject();
+         if (!(o instanceof List))
+         {
+            throw new IllegalStateException("Error reading test results - expected a List<TestResult> but got " + o);
+         }
+         List<TestResult> results = (List<TestResult>) o;
+         return results;
+      }
+      else
+      {
+         throw new IllegalStateException("Error launching test " + httpConnection.getResponseMessage());
+      }
+   }
+   
+   private Object deserialize(byte[] bytes) throws IOException, ClassNotFoundException
+   {
+      ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes));
+      return in.readObject();
+   }
+   
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/ServletInContainerTestLauncher.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -4,57 +4,32 @@
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Set;
 
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.jboss.webbeans.tck.api.TCKConfiguration;
-import org.jboss.webbeans.tck.api.TestSuite;
-import org.jboss.webbeans.tck.api.WebBeansTCK;
-import org.jboss.webbeans.tck.impl.util.DeploymentProperties;
-import org.jboss.webbeans.tck.spi.Beans;
-import org.jboss.webbeans.tck.spi.Containers;
-import org.jboss.webbeans.tck.spi.Contexts;
-import org.jboss.webbeans.tck.spi.Managers;
+import org.jboss.webbeans.tck.api.Configuration;
+import org.jboss.webbeans.tck.api.TCK;
+import org.jboss.webbeans.tck.impl.packaging.ArtifactGenerator;
 import org.testng.TestNG;
 import org.testng.xml.Parser;
 import org.testng.xml.XmlSuite;
 import org.xml.sax.SAXException;
 
-public class WebBeansTCKImpl extends WebBeansTCK
+public class WebBeansTCKImpl extends TCK
 {
    
-   private static TCKConfiguration configuration;
-   
-   public static TCKConfiguration configuration()
+   protected void runUnitTests()
    {
-      if (configuration == null)
-      {
-         configuration = createTCKConfiguration();
-      }
-      return configuration;
-   }
-   
-   public WebBeansTCKImpl()
-   {
-      super();
-      
-   }
-   
-   @Override
-   public boolean runUnitTests()
-   {
       TestNG testNG = new TestNG();
-      setXmlSuitePath(testNG);
-      if (configuration.getTestSuite().getOutputDirectory() != null)
+      addUnitTests(testNG);
+      if (getConfiguration().getOutputDirectory() != null)
       {
-         testNG.setOutputDirectory(configuration.getTestSuite().getOutputDirectory());
+         testNG.setOutputDirectory(getConfiguration().getOutputDirectory());
       }
       testNG.run();
-      return !(testNG.hasFailure() || testNG.hasSkip());
    }
    
-   private static void setXmlSuitePath(TestNG testNG)
+   private static void addUnitTests(TestNG testNG)
    {
       InputStream is = WebBeansTCKImpl.class.getResourceAsStream("/tck-unit-tests.xml");
       if (is == null)
@@ -83,59 +58,18 @@
    }
 
    @Override
-   protected void configure(TCKConfiguration configuration)
+   public void dumpArtifacts()
    {
-      if (configuration != null)
-      {
-         WebBeansTCKImpl.configuration = configuration;
-      }
+      Configuration configuration = new PropertiesBasedConfigurationImpl();
+      configuration.setStandalone(false);
+      configuration.setWriteDeployedArchivesToDisk(true);
+      new ArtifactGenerator(configuration).dumpArtifacts();
    }
 
-
-   public static final TCKConfiguration createTCKConfiguration()
+   @Override
+   public Configuration getConfiguration()
    {
-      DeploymentProperties deploymentProperties = new DeploymentProperties();
-      Managers managers = create(deploymentProperties.getClasses(Managers.PROPERTY_NAME, Managers.class), Managers.class, true);
-      Containers containers = create(deploymentProperties.getClasses(Containers.PROPERTY_NAME, Containers.class), Containers.class, true);
-      Beans beans = create(deploymentProperties.getClasses(Beans.PROPERTY_NAME, Beans.class), Beans.class, true);
-      Contexts<?> contexts = create(deploymentProperties.getClasses(Contexts.PROPERTY_NAME, Contexts.class), Contexts.class, true);
-      TestSuite testSuite = create(deploymentProperties.getClasses(TestSuite.PROPERTY_NAME, TestSuite.class), TestSuite.class, false);
-      return TCKConfiguration.newInstance(beans, contexts, managers, containers, testSuite);
+      return ConfigurationImpl.get();
    }
-   
-   private static <T> T create(Set<Class<? extends T>> classes, Class<T> expectedType, boolean required)
-   {
-      if (classes.size() == 0)
-      {
-         if (required)
-         {
-            throw new IllegalArgumentException("Cannot find any implementations of " + expectedType.getSimpleName() + ", check that " + expectedType.getName() + " is specified");
-         }
-         else
-         {
-            return null;
-         }
-      }
-      else if (classes.size() > 1)
-      {
-         throw new IllegalArgumentException("More than one implementation of " + expectedType.getSimpleName() + " specified, not sure which one to use!");
-      }
-      else
-      {
-         Class<? extends T> clazz = classes.iterator().next(); 
-         try
-         {
-            return clazz.newInstance();
-         }
-         catch (InstantiationException e)
-         {
-            throw new IllegalStateException("Unable to instantiate " + clazz, e);
-         }
-         catch (IllegalAccessException e)
-         {
-            throw new IllegalStateException("Unable to instantiate " + clazz, e);
-         }
-      }
-   }
 
 }

Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/packaging/ArtifactGenerator.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/packaging/ArtifactGenerator.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/packaging/ArtifactGenerator.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -0,0 +1,71 @@
+package org.jboss.webbeans.tck.impl.packaging;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+import org.jboss.webbeans.tck.api.Configuration;
+
+public class ArtifactGenerator
+{
+   
+   private static final Logger log = Logger.getLogger(ArtifactGenerator.class);
+   
+   private final Configuration configuration;
+   
+   public ArtifactGenerator(Configuration configuration)
+   {
+      if (configuration == null)
+      {
+         throw new IllegalArgumentException("packageNames must not be null");
+      }
+      this.configuration = configuration;
+   }
+
+   public List<ArtifactDescriptor> createArtifacts()
+   {
+      Set<Class<?>> classes = new HashSet<Class<?>>();
+      for (String packageName : configuration.getInContainerTestPackageNames())
+      {
+         classes.addAll(new ArtifactScanner(packageName).getClasses());
+      }
+      List<ArtifactDescriptor> artifacts = new ArrayList<ArtifactDescriptor>();
+      for (Class<?> clazz : classes)
+      {
+         artifacts.add(new DeclarativeArtifactProcessor(clazz, configuration.isStandalone(), configuration.getLibraryDirectory()).getArtifact());
+      }
+      return artifacts;
+   }
+   
+   public void dumpArtifacts() 
+   {
+      List<ArtifactDescriptor> artifacts = createArtifacts();
+      File file = new File(configuration.getOutputDirectory());
+      if (!file.exists())
+      {
+         file.mkdirs();
+      }
+      else if (file.isFile())
+      {
+         throw new IllegalStateException("Cannot use debug directory " + configuration.getOutputDirectory() + ", it already exists");
+      }
+      log.info("Writing artifacts to " + configuration.getOutputDirectory());
+      for (ArtifactDescriptor artifact : artifacts)
+      {
+         try
+         {
+            artifact.writeArtifactToDisk(configuration.getOutputDirectory());
+            log.info("Written artifact to disk " + artifact);
+         }
+         catch (IOException e)
+         {
+            log.warn("Error writing artifact to disk " + artifact, e);
+         }
+      }
+   }
+   
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/packaging/ArtifactGenerator.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/util/DeploymentProperties.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/util/DeploymentProperties.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/util/DeploymentProperties.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -9,6 +9,8 @@
 import java.util.Properties;
 import java.util.Set;
 
+import org.apache.log4j.Logger;
+
 /**
  * Utility class to load deployment properties
  * 
@@ -19,6 +21,8 @@
    // The resource bundle used to control Web Beans RI deployment
    public static final String RESOURCE_BUNDLE = "META-INF/web-beans-tck.properties";
    
+   private static final Logger log = Logger.getLogger(DeploymentProperties.class);
+   
    // The class to work from
    private SimpleResourceLoader resourceLoader;
 
@@ -126,14 +130,14 @@
     * @return A set of classes specified
     */
    @SuppressWarnings("unchecked")
-   public <T> Set<Class<? extends T>> getClasses(String propertyName, Class<T> expectedType)
+   public <T> Set<Class<T>> getClasses(String propertyName, Class<T> expectedType)
    {
-      Set<Class<? extends T>> classes = new HashSet<Class<? extends T>>();
+      Set<Class<T>> classes = new HashSet<Class<T>>();
       for (String className : getPropertyValues(propertyName))
       {
          try
          {
-            classes.add((Class<? extends T>) resourceLoader.classForName(className));
+            classes.add((Class<T>) resourceLoader.classForName(className));
          }
          catch (ResourceLoadingException e)
          {
@@ -142,5 +146,87 @@
       }
       return classes;
    }
+   
+   public <T> Class<T> getClassValue(String propertyName, Class<T> expectedType, boolean required)
+   {
+      Set<Class<T>> classes = getClasses(propertyName, expectedType);
+      if (classes.size() == 0)
+      {
+         if (required)
+         {
+            throw new IllegalArgumentException("Cannot find any implementations of " + expectedType.getSimpleName() + ", check that " + propertyName + " is specified");
+         }
+         else
+         {
+            return null;
+         }
+      }
+      else if (classes.size() > 1)
+      {
+         throw new IllegalArgumentException("More than one implementation of " + expectedType.getSimpleName() + " specified by " + propertyName + ", not sure which one to use!");
+      }
+      else
+      {
+         return classes.iterator().next(); 
+      }
+   }
+   
+   public <T> T getInstanceValue(String propertyName, Class<T> expectedType, boolean required)
+   {
+      Class<T> clazz = getClassValue(propertyName, expectedType, required);
+      if (clazz != null)
+      {
+         try
+         {
+            return clazz.newInstance();
+         }
+         catch (InstantiationException e)
+         {
+            throw new IllegalStateException("Error instantiating " + clazz + " specified by " + propertyName, e);
+         }
+         catch (IllegalAccessException e)
+         {
+            throw new IllegalStateException("Error instantiating " + clazz + " specified by " + propertyName, e);
+         }
+      }
+      else
+      {
+         return null;
+      }
+   }
+   
+   public boolean getBooleanValue(String propertyName, boolean _default, boolean required)
+   {
+      return Boolean.valueOf(getStringValue(propertyName, _default ? "true" : "false", required));
+   }
+   
+   public int getIntValue(String propertyName, int _default, boolean required)
+   {
+      return Integer.valueOf(getStringValue(propertyName, Integer.toString(_default), required)).intValue();
+   }
+   
+   public String getStringValue(String propertyName, String _default, boolean required)
+   {
+      List<String> values = getPropertyValues(propertyName);
+      if (values.size() == 0)
+      {
+         if (required)
+         {
+            throw new IllegalArgumentException("Cannot find required property " + propertyName + ", check that it is specified");
+         }
+         else
+         {
+            return _default;
+         }
+      }
+      else if (values.size() > 1)
+      {
+         throw new IllegalArgumentException("More than one value given for " + propertyName + ", not sure which one to use!");
+      }
+      else
+      {
+         return values.iterator().next();
+      }
+   }
 
 }
\ No newline at end of file

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/runner/TestRunner.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/runner/TestRunner.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/runner/TestRunner.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -31,6 +31,7 @@
    public ITestContext run()
    {
       TestNG testNG = new TestNG(false);
+      testNG.setVerbose(0);
       BufferedListener listener = new BufferedListener();
       testNG.addListener(listener);
       List<XmlSuite> suites = new ArrayList<XmlSuite>();
@@ -43,7 +44,6 @@
    private XmlSuite createSuite()
    {
       XmlSuite suite = new XmlSuite();
-      suite.setVerbose(2);
       suite.setName("JSR-299 TCK");
       
       for (String className : classNames)

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/runner/servlet/ServletTestRunner.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/runner/servlet/ServletTestRunner.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/runner/servlet/ServletTestRunner.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,7 +1,5 @@
 package org.jboss.webbeans.tck.runner.servlet;
 
-import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
-
 import java.io.IOException;
 import java.io.ObjectOutputStream;
 import java.io.PrintWriter;
@@ -11,6 +9,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.jboss.webbeans.tck.impl.ConfigurationImpl;
 import org.jboss.webbeans.tck.runner.TestRunner;
 import org.testng.ITestContext;
 import org.testng.ITestResult;
@@ -21,7 +20,7 @@
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
    {
-      configuration().getTestSuite().setStandalone(false);
+      ConfigurationImpl.get().setStandalone(false);
       TestRunner runner = new TestRunner();
       ITestContext context = runner.run();
       String outputMode;

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,7 +1,5 @@
 package org.jboss.webbeans.tck.unit.context;
 
-import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
-
 import java.lang.annotation.Annotation;
 
 import javax.context.Context;
@@ -12,6 +10,7 @@
 
 import org.jboss.webbeans.tck.AbstractTest;
 import org.jboss.webbeans.tck.SpecAssertion;
+import org.jboss.webbeans.tck.impl.ConfigurationImpl;
 import org.testng.annotations.Test;
 
 /**
@@ -59,7 +58,7 @@
    @SpecAssertion(section = "8.5", id = "unknown")
    public void testGetContextWithNoActiveContextsFails()
    {
-      configuration().getContexts().setInactive(configuration().getContexts().getRequestContext());
+      ConfigurationImpl.get().getContexts().setInactive(ConfigurationImpl.get().getContexts().getRequestContext());
       manager.getContext(RequestScoped.class);
    }
 

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,7 +1,5 @@
 package org.jboss.webbeans.tck.unit.context.dependent;
 
-import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
-
 import java.util.Set;
 
 import javax.context.Context;
@@ -11,6 +9,7 @@
 
 import org.jboss.webbeans.tck.AbstractTest;
 import org.jboss.webbeans.tck.SpecAssertion;
+import org.jboss.webbeans.tck.impl.ConfigurationImpl;
 import org.testng.annotations.Test;
 
 /**
@@ -56,7 +55,7 @@
     * Any instance of the (@Dependent scoped) bean that is used to evaluate a
     * Unified EL expression exists to service that evaluation only.
     */
-   @Test(groups = { "contexts", "el", "broken" })
+   @Test(groups = { "contexts", "el" })
    @SpecAssertion(section = "8.3", id = "unknown")
    public void testInstanceUsedForElEvaluationNotShared() throws Exception
    {
@@ -69,8 +68,8 @@
             Set<Bean<Fox>> foxBeans = manager.resolveByType(Fox.class);
             assert foxBeans.size() == 1;
 
-            Fox fox1 = configuration().getContainers().evaluateValueExpression("#{fox}", Fox.class);
-            Fox fox2 = configuration().getContainers().evaluateValueExpression("#{fox}", Fox.class);
+            Fox fox1 = ConfigurationImpl.get().getEL().evaluateValueExpression("#{fox}", Fox.class);
+            Fox fox2 = ConfigurationImpl.get().getEL().evaluateValueExpression("#{fox}", Fox.class);
             assert !fox1.equals(fox2);
          }
       }.run();
@@ -296,7 +295,7 @@
     * while a Unified EL expression is evaluated, or
     * @throws Exception 
     */
-   @Test(groups = { "contexts", "el", "broken" })
+   @Test(groups = { "contexts", "el" })
    @SpecAssertion(section = "8.3", id = "unknown")
    public void testContextIsActiveWhenEvaluatingElExpression() throws Exception
    {
@@ -307,7 +306,7 @@
          @Override
          protected void execute() throws Exception
          {
-            String foxName = configuration().getContainers().evaluateMethodExpression("#{sensitiveFox.getName}", String.class, new Class[0], new Object[0]);
+            String foxName = ConfigurationImpl.get().getEL().evaluateMethodExpression("#{sensitiveFox.getName}", String.class, new Class[0], new Object[0]);
             assert foxName != null;
             assert SensitiveFox.isDependentContextActiveDuringEval();
          }
@@ -416,7 +415,7 @@
     * 
     * @throws Exception
     */
-   @Test(groups = { "contexts", "el", "broken" })
+   @Test(groups = { "contexts", "el"})
    @SpecAssertion(section = "8.3.2", id = "unknown")
    public void testDependentsDestroyedWhenElEvaluationCompletes() throws Exception
    {
@@ -430,7 +429,7 @@
             assert foxBeans.size() == 1;
             Bean<Fox> foxBean = foxBeans.iterator().next();
 
-            Fox fox1 = configuration().getContainers().evaluateValueExpression("#{fox}", Fox.class);
+            Fox fox1 = ConfigurationImpl.get().getEL().evaluateValueExpression("#{fox}", Fox.class);
             assert fox1 != null;
             assert manager.getContext(Dependent.class).get(foxBean) == null;
          }

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/CustomDeploymentTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/CustomDeploymentTypeTest.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/CustomDeploymentTypeTest.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,7 +1,5 @@
 package org.jboss.webbeans.tck.unit.definition.deployment;
 
-import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
-
 import java.lang.annotation.Annotation;
 import java.util.Arrays;
 import java.util.List;
@@ -11,6 +9,7 @@
 import org.jboss.webbeans.tck.AbstractTest;
 import org.jboss.webbeans.tck.SpecAssertion;
 import org.jboss.webbeans.tck.SpecAssertions;
+import org.jboss.webbeans.tck.impl.ConfigurationImpl;
 import org.testng.annotations.Test;
 
 /**
@@ -36,10 +35,10 @@
    })
    public void testCustomDeploymentTypes()
    {
-      assert configuration().getManagers().getEnabledDeploymentTypes().size() == 3;
-      assert configuration().getManagers().getEnabledDeploymentTypes().get(0).equals(Standard.class);
-      assert configuration().getManagers().getEnabledDeploymentTypes().get(1).equals(AnotherDeploymentType.class);
-      assert configuration().getManagers().getEnabledDeploymentTypes().get(2).equals(HornedAnimalDeploymentType.class);
+      assert ConfigurationImpl.get().getManagers().getEnabledDeploymentTypes().size() == 3;
+      assert ConfigurationImpl.get().getManagers().getEnabledDeploymentTypes().get(0).equals(Standard.class);
+      assert ConfigurationImpl.get().getManagers().getEnabledDeploymentTypes().get(1).equals(AnotherDeploymentType.class);
+      assert ConfigurationImpl.get().getManagers().getEnabledDeploymentTypes().get(2).equals(HornedAnimalDeploymentType.class);
    }
    
 }

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DefaultDeploymentTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DefaultDeploymentTypeTest.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DefaultDeploymentTypeTest.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,13 +1,12 @@
 package org.jboss.webbeans.tck.unit.definition.deployment;
 
-import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
-
 import javax.inject.Production;
 import javax.inject.Standard;
 
 import org.jboss.webbeans.tck.AbstractTest;
 import org.jboss.webbeans.tck.SpecAssertion;
 import org.jboss.webbeans.tck.SpecAssertions;
+import org.jboss.webbeans.tck.impl.ConfigurationImpl;
 import org.jboss.webbeans.tck.impl.packaging.Artifact;
 import org.jboss.webbeans.tck.impl.packaging.Classes;
 import org.testng.annotations.Test;
@@ -29,9 +28,9 @@
    })
    public void testDefaultEnabledDeploymentTypes()
    {
-      assert configuration().getManagers().getEnabledDeploymentTypes().size() == 2;
-      assert configuration().getManagers().getEnabledDeploymentTypes().get(0).equals(Standard.class);
-      assert configuration().getManagers().getEnabledDeploymentTypes().get(1).equals(Production.class);
+      assert ConfigurationImpl.get().getManagers().getEnabledDeploymentTypes().size() == 2;
+      assert ConfigurationImpl.get().getManagers().getEnabledDeploymentTypes().get(0).equals(Standard.class);
+      assert ConfigurationImpl.get().getManagers().getEnabledDeploymentTypes().get(1).equals(Production.class);
    }
    
 }

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -12,7 +12,6 @@
 import org.jboss.webbeans.tck.AbstractTest;
 import org.jboss.webbeans.tck.SpecAssertion;
 import org.jboss.webbeans.tck.SpecAssertions;
-import org.jboss.webbeans.tck.impl.packaging.Artifact;
 import org.testng.annotations.Test;
 
 /**

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/broken/TooManyDeploymentTypesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/broken/TooManyDeploymentTypesTest.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/definition/deployment/broken/TooManyDeploymentTypesTest.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -21,8 +21,6 @@
 
 import org.jboss.webbeans.tck.AbstractTest;
 import org.jboss.webbeans.tck.SpecAssertion;
-import org.jboss.webbeans.tck.impl.packaging.Artifact;
-import org.jboss.webbeans.tck.impl.packaging.Classes;
 import org.testng.annotations.Test;
 
 /**

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1394,6 +1394,7 @@
    @SpecAssertion(section = "7.7", id = "unknown")
    public void testResolvingChecksBindingTypes()
    {
+      deployBeans();
       AnObserver observer = new AnObserver();
       AnObserver anotherObserver = new AnObserver();
       manager.addObserver(observer, AnEventType.class, new BindingTypeABinding());

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/clientProxy/ClientProxyTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/clientProxy/ClientProxyTest.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/clientProxy/ClientProxyTest.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,7 +1,5 @@
 package org.jboss.webbeans.tck.unit.lookup.clientProxy;
 
-import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
-
 import java.io.IOException;
 import java.lang.annotation.Annotation;
 import java.util.List;
@@ -12,6 +10,7 @@
 
 import org.jboss.webbeans.tck.AbstractTest;
 import org.jboss.webbeans.tck.SpecAssertion;
+import org.jboss.webbeans.tck.impl.ConfigurationImpl;
 import org.testng.annotations.Test;
 
 /**
@@ -36,7 +35,7 @@
    {
       deployBeans(Tuna.class);
       Tuna tuna = manager.getInstanceByType(Tuna.class);
-      assert configuration().getBeans().isProxy(tuna);
+      assert ConfigurationImpl.get().getBeans().isProxy(tuna);
    }
 
    @Test(groups = "configuration().getBeans()")
@@ -48,7 +47,7 @@
       {
          activateDependentContext();
          Fox fox = manager.getInstance(foxBean);
-         assert !configuration().getBeans().isProxy(fox);
+         assert !ConfigurationImpl.get().getBeans().isProxy(fox);
       }
       finally
       {
@@ -63,10 +62,10 @@
       Bean<TunedTuna> tunaBean = createSimpleBean(TunedTuna.class);
       manager.addBean(tunaBean);
       TunedTuna tuna = manager.getInstance(tunaBean);
-      assert configuration().getBeans().isProxy(tuna);
+      assert ConfigurationImpl.get().getBeans().isProxy(tuna);
       byte[] bytes = serialize(tuna);
       tuna = (TunedTuna) deserialize(bytes);
-      assert configuration().getBeans().isProxy(tuna);
+      assert ConfigurationImpl.get().getBeans().isProxy(tuna);
       assert tuna.getState().equals("tuned");
    }
 
@@ -88,7 +87,7 @@
       Bean<TunedTuna> tunaBean = createSimpleBean(TunedTuna.class);
       manager.addBean(tunaBean);
       TunedTuna tuna = manager.getInstance(tunaBean);
-      assert configuration().getBeans().isProxy(tuna);
+      assert ConfigurationImpl.get().getBeans().isProxy(tuna);
       assert tuna.getState().equals("tuned");
    }
    

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/injection/InjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/injection/InjectionTest.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/injection/InjectionTest.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,7 +1,5 @@
 package org.jboss.webbeans.tck.unit.lookup.injection;
 
-import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
-
 import java.lang.annotation.Annotation;
 import java.util.List;
 
@@ -12,6 +10,7 @@
 
 import org.jboss.webbeans.tck.AbstractTest;
 import org.jboss.webbeans.tck.SpecAssertion;
+import org.jboss.webbeans.tck.impl.ConfigurationImpl;
 import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
 import org.testng.annotations.Test;
 
@@ -60,7 +59,7 @@
       manager.addBean(tunaBean);
       TunaFarm tunaFarm = tunaFarmBean.create(new MockCreationalContext<TunaFarm>());
       assert tunaFarm.tuna != null;
-      configuration().getContexts().setInactive(configuration().getContexts().getRequestContext());
+      ConfigurationImpl.get().getContexts().setInactive(ConfigurationImpl.get().getContexts().getRequestContext());
       tunaFarm.tuna.getName();
    }
 

Deleted: tck/trunk/impl/src/test/java/org/jboss/webbeans/tck/test/impl/InContainerTestRunnerTest.java
===================================================================
--- tck/trunk/impl/src/test/java/org/jboss/webbeans/tck/test/impl/InContainerTestRunnerTest.java	2009-02-08 15:03:03 UTC (rev 1452)
+++ tck/trunk/impl/src/test/java/org/jboss/webbeans/tck/test/impl/InContainerTestRunnerTest.java	2009-02-08 17:02:04 UTC (rev 1453)
@@ -1,66 +0,0 @@
-package org.jboss.webbeans.tck.test.impl;
-
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.util.List;
-
-import javax.inject.manager.Manager;
-
-import org.jboss.webbeans.tck.api.TestSuite;
-import org.jboss.webbeans.tck.impl.InContainerTestRunner;
-import org.jboss.webbeans.tck.spi.Containers;
-
-public class InContainerTestRunnerTest
-{
-   
-   private static class MockInContainerTestRunner extends InContainerTestRunner
-   {
-
-      public MockInContainerTestRunner(TestSuite testSuite, Containers containers)
-      {
-         super(testSuite, containers);
-         // TODO Auto-generated constructor stub
-      }
-      
-   }
-   
-   private static class MockContainers implements Containers
-   {
-
-      public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, InputStream archive)
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Manager deploy(InputStream archive)
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public <T> T evaluateMethodExpression(String expression, Class<T> expectedType, Class<?>[] expectedParamTypes, Object[] expectedParams)
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public <T> T evaluateValueExpression(String expression, Class<T> expectedType)
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-      
-   }
-
-   //@Test
-   public void testRunner()
-   {
-//      TestSuite testSuite = new TestSuite();
-//      testSuite.setWriteDeployedArchivesToDisk(true);
-//      testSuite.setDeploymentDelay(0);
-//      MockInContainerTestRunner runner = new MockInContainerTestRunner(testSuite, new MockContainers());
-//      runner.run();
-   }
-   
-}




More information about the weld-commits mailing list