[webbeans-commits] Webbeans SVN: r862 - in tck/trunk: impl/src/main/java/org/jboss/webbeans/tck/impl and 2 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Fri Jan 9 12:21:05 EST 2009
Author: pete.muir at jboss.org
Date: 2009-01-09 12:21:05 -0500 (Fri, 09 Jan 2009)
New Revision: 862
Modified:
tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Managers.java
tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/WebBeansTCK.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/test/AbstractTest.java
tck/trunk/impl/src/main/resources/unit-tests.xml
Log:
Fix tests
Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Managers.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Managers.java 2009-01-09 16:13:20 UTC (rev 861)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Managers.java 2009-01-09 17:21:05 UTC (rev 862)
@@ -22,7 +22,7 @@
void setEnabledDeploymentTypes(List<Class<? extends Annotation>> enabledDeploymentTypes);
/**
- * Get the Manager instance
+ * Get a new Manager instance
*
* @return the Manager
*/
Modified: 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-01-09 16:13:20 UTC (rev 861)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/WebBeansTCK.java 2009-01-09 17:21:05 UTC (rev 862)
@@ -45,10 +45,10 @@
/**
* Run the whole TCK
*/
- public final void run()
+ public final boolean run()
{
// Load Configuration and run
- runUnitTests();
+ return runUnitTests();
}
public static void main(String[] args)
@@ -60,7 +60,7 @@
{
}
- protected abstract void runUnitTests();
+ protected abstract boolean runUnitTests();
/**
* Configure the TCK
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-01-09 16:13:20 UTC (rev 861)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java 2009-01-09 17:21:05 UTC (rev 862)
@@ -17,7 +17,7 @@
public class WebBeansTCKImpl extends WebBeansTCK
{
- private TCKConfiguration configuration;
+ public static TCKConfiguration configuration;
public WebBeansTCKImpl()
{
@@ -25,11 +25,12 @@
}
@Override
- public void runUnitTests()
+ public boolean runUnitTests()
{
TestNG testNG = new TestNG();
setXmlSuitePath(testNG);
testNG.run();
+ return !(testNG.hasFailure() || testNG.hasSkip());
}
private static void setXmlSuitePath(TestNG testNG)
@@ -69,7 +70,7 @@
}
else
{
- this.configuration = configuration;
+ WebBeansTCKImpl.configuration = configuration;
}
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/AbstractTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/AbstractTest.java 2009-01-09 16:13:20 UTC (rev 861)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/test/AbstractTest.java 2009-01-09 17:21:05 UTC (rev 862)
@@ -6,11 +6,15 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.lang.reflect.Method;
+import java.util.Arrays;
+import javax.webbeans.Production;
+import javax.webbeans.Standard;
import javax.webbeans.manager.Bean;
import javax.webbeans.manager.Manager;
-import org.jboss.webbeans.tck.impl.TckUtils;
+import org.jboss.webbeans.tck.impl.WebBeansTCKImpl;
+import org.jboss.webbeans.tck.impl.test.annotations.AnotherDeploymentType;
import org.testng.annotations.BeforeMethod;
public class AbstractTest
@@ -24,18 +28,18 @@
@BeforeMethod
public final void before()
{
- manager = TckUtils.getManagers().getManager();
- //addStandardDeploymentTypesForTests();
+ manager = WebBeansTCKImpl.configuration.getManagers().getManager();
+ WebBeansTCKImpl.configuration.getManagers().setEnabledDeploymentTypes(Arrays.asList(Standard.class, Production.class, AnotherDeploymentType.class));
}
public <T> Bean<T> getSimpleBean(Class<T> beanClass)
{
- return TckUtils.getBeans().createSimpleBean(beanClass);
+ return WebBeansTCKImpl.configuration.getBeans().createSimpleBean(beanClass);
}
public <T> Bean<?> getProducerMethodBean(Method method, Bean<?> producerBean)
{
- return TckUtils.getBeans().createProducerMethodBean(method, producerBean);
+ return WebBeansTCKImpl.configuration.getBeans().createProducerMethodBean(method, producerBean);
}
/*
Modified: tck/trunk/impl/src/main/resources/unit-tests.xml
===================================================================
--- tck/trunk/impl/src/main/resources/unit-tests.xml 2009-01-09 16:13:20 UTC (rev 861)
+++ tck/trunk/impl/src/main/resources/unit-tests.xml 2009-01-09 17:21:05 UTC (rev 862)
@@ -1,6 +1,6 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-<suite name="WebBeans TCK" verbose="3" >
+<suite name="WebBeans TCK" verbose="2" >
<test name="Web Beans TCK" >
<groups >
More information about the weld-commits
mailing list