[webbeans-commits] Webbeans SVN: r758 - in ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts: invalid and 1 other directory.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sun Jan 4 16:35:21 EST 2009
Author: nickarls
Date: 2009-01-04 16:35:21 -0500 (Sun, 04 Jan 2009)
New Revision: 758
Added:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/invalid/Loviisa.java
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/PassivatingContextTest.java
Log:
Missing constructor parameter tests
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/PassivatingContextTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/PassivatingContextTest.java 2009-01-04 20:18:46 UTC (rev 757)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/PassivatingContextTest.java 2009-01-04 21:35:21 UTC (rev 758)
@@ -25,6 +25,7 @@
import org.jboss.webbeans.test.contexts.invalid.CityProducer;
import org.jboss.webbeans.test.contexts.invalid.CityProducer2;
import org.jboss.webbeans.test.contexts.invalid.CityProducer3;
+import org.jboss.webbeans.test.contexts.invalid.Loviisa;
import org.jboss.webbeans.test.contexts.invalid.Peraseinajoki;
import org.jboss.webbeans.test.contexts.invalid.Espoo;
import org.jboss.webbeans.test.contexts.invalid.Forssa;
@@ -340,12 +341,12 @@
* UnserializableDependencyException must be thrown by the Web Bean manager
* at initialization time.
*/
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
@SpecAssertion(section = "9.5")
public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
{
- // TODO: case?
- assert false;
+ registerBeans(new Class<?>[] { Violation.class, Loviisa.class} );
+ manager.validate();
}
/**
@@ -443,11 +444,12 @@
* parameter of a producer method which declares a passivating scope type, an
* IllegalProductException is thrown by the Web Bean manager.
*/
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
@SpecAssertion(section = "9.5")
public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
{
- assert false;
+ registerProducerBean(CityProducer2.class, "create", Violation.class);
+ getInstance(Loviisa.class).ping();
}
/**
@@ -547,12 +549,12 @@
* parameter of a producer method which declares a passivating scope type, an
* IllegalProductException is thrown by the Web Bean manager.
*/
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
@SpecAssertion(section = "9.5")
public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
{
- // TODO: case?
- assert false;
+ registerProducerBean(CityProducer.class, "reference", Violation.class);
+ getInstance(Loviisa.class).ping();
}
/**
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/invalid/Loviisa.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/invalid/Loviisa.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/invalid/Loviisa.java 2009-01-04 21:35:21 UTC (rev 758)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.test.contexts.invalid;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.Initializer;
+import javax.webbeans.SessionScoped;
+
+import org.jboss.webbeans.test.contexts.valid.City;
+
+ at SessionScoped
+public class Loviisa extends City implements Serializable
+{
+ public Loviisa() {
+ }
+
+ @Initializer
+ public Loviisa(@Current Violation reference) {
+
+ }
+}
More information about the weld-commits
mailing list