[webbeans-commits] Webbeans SVN: r2703 - ri/trunk/osgi-bundle.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-05-25 07:15:48 -0400 (Mon, 25 May 2009)
New Revision: 2703
Added:
ri/trunk/osgi-bundle/.project
Log:
Added Eclipse project file to ignore list for OSGi bundle project.
Added: ri/trunk/osgi-bundle/.project
===================================================================
--- ri/trunk/osgi-bundle/.project (rev 0)
+++ ri/trunk/osgi-bundle/.project 2009-05-25 11:15:48 UTC (rev 2703)
@@ -0,0 +1,23 @@
+<projectDescription>
+ <name>webbeans-osgi-bundle</name>
+ <comment>Web Beans implementation packaged as an OSGi bundle</comment>
+ <projects>
+ <project>jsr299-api</project>
+ <project>webbeans-api</project>
+ <project>webbeans-core</project>
+ <project>webbeans-logging</project>
+ <project>webbeans-spi</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Property changes on: ri/trunk/osgi-bundle/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2702 - ri/trunk/osgi-bundle.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-05-25 07:12:37 -0400 (Mon, 25 May 2009)
New Revision: 2702
Removed:
ri/trunk/osgi-bundle/.project
Log:
Deleting Eclipse project file from OSGi bundle project
Deleted: ri/trunk/osgi-bundle/.project
===================================================================
--- ri/trunk/osgi-bundle/.project 2009-05-25 11:11:21 UTC (rev 2701)
+++ ri/trunk/osgi-bundle/.project 2009-05-25 11:12:37 UTC (rev 2702)
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>webbeans-osgi-bundle</name>
- <comment>Web Beans implementation packaged as an OSGi bundle</comment>
- <projects>
- <project>jsr299-api</project>
- <project>webbeans-api</project>
- <project>webbeans-core</project>
- <project>webbeans-logging</project>
- <project>webbeans-spi</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- </natures>
-</projectDescription>
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2701 - ri/trunk/osgi-bundle.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-05-25 07:11:21 -0400 (Mon, 25 May 2009)
New Revision: 2701
Added:
ri/trunk/osgi-bundle/.project
Removed:
ri/trunk/osgi-bundle/.project
Modified:
ri/trunk/osgi-bundle/
Log:
Removing Eclipse project file from the OSGi bundle project.
Property changes on: ri/trunk/osgi-bundle
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
Deleted: ri/trunk/osgi-bundle/.project
===================================================================
--- ri/trunk/osgi-bundle/.project 2009-05-24 20:17:54 UTC (rev 2700)
+++ ri/trunk/osgi-bundle/.project 2009-05-25 11:11:21 UTC (rev 2701)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>osgi</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- </natures>
-</projectDescription>
Added: ri/trunk/osgi-bundle/.project
===================================================================
--- ri/trunk/osgi-bundle/.project (rev 0)
+++ ri/trunk/osgi-bundle/.project 2009-05-25 11:11:21 UTC (rev 2701)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>webbeans-osgi-bundle</name>
+ <comment>Web Beans implementation packaged as an OSGi bundle</comment>
+ <projects>
+ <project>jsr299-api</project>
+ <project>webbeans-api</project>
+ <project>webbeans-core</project>
+ <project>webbeans-logging</project>
+ <project>webbeans-spi</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2700 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition: broken1 and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-05-24 16:17:54 -0400 (Sun, 24 May 2009)
New Revision: 2700
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/SpiderProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/MultipleDisposeParametersDefinitionTest.java
Log:
Additional disposes tests
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java 2009-05-22 20:17:39 UTC (rev 2699)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java 2009-05-24 20:17:54 UTC (rev 2700)
@@ -3,7 +3,6 @@
import java.lang.annotation.Annotation;
import javax.inject.AnnotationLiteral;
-import javax.inject.DefinitionException;
import javax.inject.manager.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
@@ -26,11 +25,11 @@
@SpecAssertion(section = "3.4.6", id = "c"),
@SpecAssertion(section = "3.4.6", id = "e"),
@SpecAssertion(section = "3.4.7", id = "b"),
- @SpecAssertion(section = "3.4.8", id = "a")
+ @SpecAssertion(section = "3.4.8", id = "a"),
+ @SpecAssertion(section = "3.4.11", id = "a")
})
public void testBindingTypesAppliedToDisposalMethodParameters() throws Exception
{
- SpiderProducer spiderProducer = getCurrentManager().getInstanceByType(SpiderProducer.class);
new RunInDependentContext()
{
@@ -43,8 +42,8 @@
}
}.run();
- assert spiderProducer.isTameSpiderDestroyed();
- assert spiderProducer.isCurrentSpiderDestroyed();
+ assert SpiderProducer.isTameSpiderDestroyed();
+ assert SpiderProducer.isCurrentSpiderDestroyed();
}
@Test
@@ -75,36 +74,25 @@
* calls Manager.getInstanceToInject() to determine a value for each
* parameter of a disposal method and calls the disposal method with those
* parameter values
+ * @throws Exception
*/
- @Test(groups = { "stub", "disposalMethod" })
+ @Test(groups = { "disposalMethod" })
@SpecAssertion(section = "3.4.10", id = "a")
- public void testDisposalMethodParametersGetInjected()
+ public void testDisposalMethodParametersGetInjected() throws Exception
{
- assert false;
- }
+ new RunInDependentContext()
+ {
- /**
- * When searching for disposal methods for a producer method, the container
- * searches for disposal methods which are declared by an enabled bean, and
- * for which the disposed parameter must resolve to the producer method,
- * according to the typesafe resolution algorithm
- */
- @Test(groups = { "stub", "disposalMethod" })
- @SpecAssertion(section = "3.4.11", id = "a")
- public void testDisposalMethodTypeSafeResolution()
- {
- assert false;
+ @Override
+ protected void execute() throws Exception
+ {
+ Bean<Tarantula> tarantula = getCurrentManager().resolveByType(Tarantula.class, DEADLIEST_LITERAL).iterator().next();
+ Tarantula instance = getCurrentManager().getInstance(tarantula);
+ tarantula.destroy(instance);
+ }
+
+ }.run();
+ assert SpiderProducer.isDeadliestSpiderDestroyed();
}
- /**
- * If there are multiple disposal methods for a producer method, a
- * DefinitionException is thrown by the container at deployment time
- */
- @Test(groups = { "stub", "disposalMethod" }, expectedExceptions = { DefinitionException.class })
- @SpecAssertion(section = "3.4.11", id = "b")
- public void testMultipleDisposalMethodsFails()
- {
- assert false;
- }
-
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/SpiderProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/SpiderProducer.java 2009-05-22 20:17:39 UTC (rev 2699)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/SpiderProducer.java 2009-05-24 20:17:54 UTC (rev 2700)
@@ -9,6 +9,7 @@
{
private static boolean tameSpiderDestroyed = false;
private static boolean currentSpiderDestroyed = false;
+ private static boolean deadliestSpiderDestroyed = false;
@Produces public Tarantula produceTarantula()
{
@@ -37,13 +38,24 @@
SpiderProducer.currentSpiderDestroyed = true;
}
- public boolean isTameSpiderDestroyed()
+ public static void destroyDeadliestSpider(@Disposes @Deadliest Tarantula spider, @Current Tarantula anotherSpider)
{
+ assert spider != anotherSpider;
+ SpiderProducer.deadliestSpiderDestroyed = true;
+ }
+
+ public static boolean isTameSpiderDestroyed()
+ {
return tameSpiderDestroyed;
}
- public boolean isCurrentSpiderDestroyed()
+ public static boolean isCurrentSpiderDestroyed()
{
return currentSpiderDestroyed;
}
+
+ public static boolean isDeadliestSpiderDestroyed()
+ {
+ return deadliestSpiderDestroyed;
+ }
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/MultipleDisposeParametersDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/MultipleDisposeParametersDefinitionTest.java 2009-05-22 20:17:39 UTC (rev 2699)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/MultipleDisposeParametersDefinitionTest.java 2009-05-24 20:17:54 UTC (rev 2700)
@@ -23,7 +23,8 @@
@Test
@SpecAssertions({
@SpecAssertion(section = "3.4.7", id = "a"),
- @SpecAssertion(section = "3.4.8", id = "b")
+ @SpecAssertion(section = "3.4.8", id = "b"),
+ @SpecAssertion(section = "3.4.11", id = "b")
})
public void testMultipleDisposeParameters()
{
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2699 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation: disposal/method/definition/broken1 and 6 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-05-22 16:17:39 -0400 (Fri, 22 May 2009)
New Revision: 2699
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/disposal/definition/
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/MultipleDisposeParametersDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/ProducesUnallowedDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/InitializerUnallowedDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/ObserverParameterUnallowedDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/UnresolvedDisposalMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/DisposalMethodOnSessionBean.java
Log:
More tests and corrected assertion assignments up to section 3.4.10
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java 2009-05-22 14:03:20 UTC (rev 2698)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java 2009-05-22 20:17:39 UTC (rev 2699)
@@ -3,6 +3,7 @@
import java.lang.annotation.Annotation;
import javax.inject.AnnotationLiteral;
+import javax.inject.DefinitionException;
import javax.inject.manager.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
@@ -23,7 +24,9 @@
@SpecAssertion(section = "2.3.6", id = "c"),
@SpecAssertion(section = "3.4.6", id = "b"),
@SpecAssertion(section = "3.4.6", id = "c"),
- @SpecAssertion(section = "3.4.6", id = "e")
+ @SpecAssertion(section = "3.4.6", id = "e"),
+ @SpecAssertion(section = "3.4.7", id = "b"),
+ @SpecAssertion(section = "3.4.8", id = "a")
})
public void testBindingTypesAppliedToDisposalMethodParameters() throws Exception
{
@@ -46,7 +49,8 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "3.4.6", id = "a")
+ @SpecAssertion(section = "3.4.6", id = "a"),
+ @SpecAssertion(section = "3.4.7", id = "d")
})
public void testDisposalMethodOnNonBean() throws Exception
{
@@ -65,4 +69,42 @@
assert !DisposalNonBean.isSpiderDestroyed();
}
+ /**
+ * In addition to the disposed parameter, a disposal method may declare
+ * additional parameters, which may also specify bindings. The container
+ * calls Manager.getInstanceToInject() to determine a value for each
+ * parameter of a disposal method and calls the disposal method with those
+ * parameter values
+ */
+ @Test(groups = { "stub", "disposalMethod" })
+ @SpecAssertion(section = "3.4.10", id = "a")
+ public void testDisposalMethodParametersGetInjected()
+ {
+ assert false;
+ }
+
+ /**
+ * When searching for disposal methods for a producer method, the container
+ * searches for disposal methods which are declared by an enabled bean, and
+ * for which the disposed parameter must resolve to the producer method,
+ * according to the typesafe resolution algorithm
+ */
+ @Test(groups = { "stub", "disposalMethod" })
+ @SpecAssertion(section = "3.4.11", id = "a")
+ public void testDisposalMethodTypeSafeResolution()
+ {
+ assert false;
+ }
+
+ /**
+ * If there are multiple disposal methods for a producer method, a
+ * DefinitionException is thrown by the container at deployment time
+ */
+ @Test(groups = { "stub", "disposalMethod" }, expectedExceptions = { DefinitionException.class })
+ @SpecAssertion(section = "3.4.11", id = "b")
+ public void testMultipleDisposalMethodsFails()
+ {
+ assert false;
+ }
+
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/MultipleDisposeParametersDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/MultipleDisposeParametersDefinitionTest.java 2009-05-22 14:03:20 UTC (rev 2698)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken1/MultipleDisposeParametersDefinitionTest.java 2009-05-22 20:17:39 UTC (rev 2699)
@@ -3,6 +3,7 @@
import javax.inject.DefinitionException;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
@@ -20,7 +21,10 @@
public class MultipleDisposeParametersDefinitionTest extends AbstractJSR299Test
{
@Test
- @SpecAssertion(section = "3.4.8", id = "a")
+ @SpecAssertions({
+ @SpecAssertion(section = "3.4.7", id = "a"),
+ @SpecAssertion(section = "3.4.8", id = "b")
+ })
public void testMultipleDisposeParameters()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/ProducesUnallowedDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/ProducesUnallowedDefinitionTest.java 2009-05-22 14:03:20 UTC (rev 2698)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken2/ProducesUnallowedDefinitionTest.java 2009-05-22 20:17:39 UTC (rev 2699)
@@ -18,7 +18,7 @@
public class ProducesUnallowedDefinitionTest extends AbstractJSR299Test
{
@Test
- @SpecAssertion(section = "3.4.8", id = "b")
+ @SpecAssertion(section = "3.4.8", id = "c")
public void testProducesUnallowed()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/InitializerUnallowedDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/InitializerUnallowedDefinitionTest.java 2009-05-22 14:03:20 UTC (rev 2698)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken3/InitializerUnallowedDefinitionTest.java 2009-05-22 20:17:39 UTC (rev 2699)
@@ -20,7 +20,7 @@
public class InitializerUnallowedDefinitionTest extends AbstractJSR299Test
{
@Test
- @SpecAssertion(section = "3.4.8", id = "c")
+ @SpecAssertion(section = "3.4.8", id = "d")
public void testInitializerUnallowed()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/ObserverParameterUnallowedDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/ObserverParameterUnallowedDefinitionTest.java 2009-05-22 14:03:20 UTC (rev 2698)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken4/ObserverParameterUnallowedDefinitionTest.java 2009-05-22 20:17:39 UTC (rev 2699)
@@ -20,7 +20,7 @@
public class ObserverParameterUnallowedDefinitionTest extends AbstractJSR299Test
{
@Test
- @SpecAssertion(section = "3.4.8", id = "d")
+ @SpecAssertion(section = "3.4.8", id = "e")
public void testObserverParameterUnallowed()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/UnresolvedDisposalMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/UnresolvedDisposalMethodDefinitionTest.java 2009-05-22 14:03:20 UTC (rev 2698)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken5/UnresolvedDisposalMethodDefinitionTest.java 2009-05-22 20:17:39 UTC (rev 2699)
@@ -20,7 +20,7 @@
public class UnresolvedDisposalMethodDefinitionTest extends AbstractJSR299Test
{
@Test
- @SpecAssertion(section = "3.4.7", id = "a")
+ @SpecAssertion(section = "3.4.7", id = "c")
public void testUnresolvedDisposalMethod()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/DisposalMethodOnSessionBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/DisposalMethodOnSessionBean.java 2009-05-22 14:03:20 UTC (rev 2698)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/DisposalMethodOnSessionBean.java 2009-05-22 20:17:39 UTC (rev 2699)
@@ -3,6 +3,7 @@
import javax.inject.DefinitionException;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
@@ -13,7 +14,10 @@
public class DisposalMethodOnSessionBean extends AbstractJSR299Test
{
@Test
- @SpecAssertion(section = "3.4.6", id = "d")
+ @SpecAssertions({
+ @SpecAssertion(section = "3.4.6", id = "d"),
+ @SpecAssertion(section = "3.4.8", id = "f")
+ })
public void testDisposalMethodNotBusinessOrStatic()
{
assert false;
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2698 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation: disposal/method/definition/broken6 and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-05-22 10:03:20 -0400 (Fri, 22 May 2009)
New Revision: 2698
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalNonBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/Apple.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/AppleTree.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/AppleTreeLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/DisposalMethodOnSessionBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Cherry.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/NonBeanWithStaticProducerMethod.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodsByBindingTest.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/SpiderProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/disposal/definition/DisposalMethodDefinitionTest.java
Log:
Some disposal method tests for 3.4.6
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java (from rev 2696, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodsByBindingTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java 2009-05-22 14:03:20 UTC (rev 2698)
@@ -0,0 +1,68 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition;
+
+import java.lang.annotation.Annotation;
+
+import javax.inject.AnnotationLiteral;
+import javax.inject.manager.Bean;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+@Artifact
+@BeansXml("beans.xml")
+public class DisposalMethodDefinitionTest extends AbstractJSR299Test
+{
+ private static final Annotation DEADLIEST_LITERAL = new AnnotationLiteral<Deadliest>() {};
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "2.3.6", id = "c"),
+ @SpecAssertion(section = "3.4.6", id = "b"),
+ @SpecAssertion(section = "3.4.6", id = "c"),
+ @SpecAssertion(section = "3.4.6", id = "e")
+ })
+ public void testBindingTypesAppliedToDisposalMethodParameters() throws Exception
+ {
+ SpiderProducer spiderProducer = getCurrentManager().getInstanceByType(SpiderProducer.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ Bean<Tarantula> tarantula = getCurrentManager().resolveByType(Tarantula.class, DEADLIEST_LITERAL).iterator().next();
+ Tarantula instance = getCurrentManager().getInstance(tarantula);
+ tarantula.destroy(instance);
+ }
+
+ }.run();
+ assert spiderProducer.isTameSpiderDestroyed();
+ assert spiderProducer.isCurrentSpiderDestroyed();
+ }
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "3.4.6", id = "a")
+ })
+ public void testDisposalMethodOnNonBean() throws Exception
+ {
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ Bean<Tarantula> tarantula = getCurrentManager().resolveByType(Tarantula.class, DEADLIEST_LITERAL).iterator().next();
+ Tarantula instance = getCurrentManager().getInstance(tarantula);
+ tarantula.destroy(instance);
+ }
+
+ }.run();
+ assert !DisposalNonBean.isSpiderDestroyed();
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodsByBindingTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodsByBindingTest.java 2009-05-21 12:08:27 UTC (rev 2697)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodsByBindingTest.java 2009-05-22 14:03:20 UTC (rev 2698)
@@ -1,41 +0,0 @@
-package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition;
-
-import java.lang.annotation.Annotation;
-
-import javax.inject.AnnotationLiteral;
-import javax.inject.manager.Bean;
-
-import org.hibernate.tck.annotations.SpecAssertion;
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.testng.annotations.Test;
-
-@Artifact
-@BeansXml("beans.xml")
-public class DisposalMethodsByBindingTest extends AbstractJSR299Test
-{
- private static final Annotation DEADLIEST_LITERAL = new AnnotationLiteral<Deadliest>() {};
-
- @Test
- @SpecAssertion(section = "2.3.6", id = "c")
- public void testBindingTypesAppliedToDisposalMethodParameters() throws Exception
- {
- SpiderProducer spiderProducer = getCurrentManager().getInstanceByType(SpiderProducer.class);
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Bean<Tarantula> tarantula = getCurrentManager().resolveByType(Tarantula.class, DEADLIEST_LITERAL).iterator().next();
- Tarantula instance = getCurrentManager().getInstance(tarantula);
- tarantula.destroy(instance);
- }
-
- }.run();
- assert spiderProducer.isTameSpiderDestroyed();
- assert spiderProducer.isCurrentSpiderDestroyed();
- }
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalNonBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalNonBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalNonBean.java 2009-05-22 14:03:20 UTC (rev 2698)
@@ -0,0 +1,28 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition;
+
+import javax.inject.Disposes;
+
+class DisposalNonBean
+{
+ private static boolean spiderDestroyed = false;
+
+ public DisposalNonBean(String someString)
+ {
+
+ }
+
+ public void destroyDeadliest(@Disposes @Deadliest Tarantula spider)
+ {
+ spiderDestroyed = true;
+ }
+
+ public static boolean isSpiderDestroyed()
+ {
+ return spiderDestroyed;
+ }
+
+ public static void setSpiderDestroyed(boolean spiderDestroyed)
+ {
+ DisposalNonBean.spiderDestroyed = spiderDestroyed;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalNonBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/SpiderProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/SpiderProducer.java 2009-05-21 12:08:27 UTC (rev 2697)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/SpiderProducer.java 2009-05-22 14:03:20 UTC (rev 2698)
@@ -32,7 +32,7 @@
SpiderProducer.tameSpiderDestroyed = true;
}
- public void destroyCurrentSpider(@Disposes @Current Tarantula spider)
+ public static void destroyCurrentSpider(@Disposes @Current Tarantula spider)
{
SpiderProducer.currentSpiderDestroyed = true;
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/Apple.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/Apple.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/Apple.java 2009-05-22 14:03:20 UTC (rev 2698)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken6;
+
+class Apple
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/Apple.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/AppleTree.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/AppleTree.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/AppleTree.java 2009-05-22 14:03:20 UTC (rev 2698)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken6;
+
+import javax.ejb.Stateless;
+import javax.inject.Produces;
+
+@Stateless
+public class AppleTree implements AppleTreeLocal
+{
+ @Produces public Apple getApple()
+ {
+ return new Apple();
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/AppleTree.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/AppleTreeLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/AppleTreeLocal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/AppleTreeLocal.java 2009-05-22 14:03:20 UTC (rev 2698)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken6;
+
+import javax.ejb.Local;
+
+@Local
+public interface AppleTreeLocal
+{
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/AppleTreeLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/DisposalMethodOnSessionBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/DisposalMethodOnSessionBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/DisposalMethodOnSessionBean.java 2009-05-22 14:03:20 UTC (rev 2698)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.implementation.disposal.method.definition.broken6;
+
+import javax.inject.DefinitionException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DefinitionException.class)
+public class DisposalMethodOnSessionBean extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "3.4.6", id = "d")
+ public void testDisposalMethodNotBusinessOrStatic()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken6/DisposalMethodOnSessionBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Cherry.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Cherry.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Cherry.java 2009-05-22 14:03:20 UTC (rev 2698)
@@ -0,0 +1,45 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.method.definition;
+
+class Cherry
+{
+ private String type;
+
+ public Cherry(String type)
+ {
+ this.type = type;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((type == null) ? 0 : type.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Cherry other = (Cherry) obj;
+ if (type == null)
+ {
+ if (other.type != null)
+ return false;
+ }
+ else if (!type.equals(other.type))
+ return false;
+ return true;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Cherry.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/NonBeanWithStaticProducerMethod.java (from rev 2696, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/BeanWithStaticProducerMethod.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/NonBeanWithStaticProducerMethod.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/NonBeanWithStaticProducerMethod.java 2009-05-22 14:03:20 UTC (rev 2698)
@@ -0,0 +1,23 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.method.definition;
+
+import javax.inject.Disposes;
+import javax.inject.Produces;
+import javax.inject.Production;
+
+@Production
+class NonBeanWithStaticProducerMethod
+{
+ public NonBeanWithStaticProducerMethod(String someString)
+ {
+
+ }
+
+ @Produces public static Cherry getCherry()
+ {
+ return new Cherry("Marischino");
+ }
+
+ public static void destroyString(@Disposes Cherry someCherry)
+ {
+ }
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-05-21 12:08:27 UTC (rev 2697)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-05-22 14:03:20 UTC (rev 2698)
@@ -30,7 +30,10 @@
private static final Annotation DEADLIEST_LITERAL = new AnnotationLiteral<Deadliest>() {};
@Test(groups = "producerMethod")
- @SpecAssertion(section = "2.5.3", id = "g")
+ @SpecAssertions( {
+ @SpecAssertion(section = "2.5.3", id = "g"),
+ @SpecAssertion(section = "3.4.4", id = "a")
+ } )
public void testProducerMethodInheritsDeploymentTypeOfDeclaringWebBean() throws Exception
{
assert getCurrentManager().resolveByType(Tarantula.class, TAME_LITERAL).size() == 1;
@@ -49,6 +52,15 @@
assert getCurrentManager().getInstanceByType(String.class).equals(BeanWithStaticProducerMethod.getString());
}
+ @Test(groups = { "producerMethod" })
+ @SpecAssertions( {
+ @SpecAssertion(section = "3.4", id = "a")
+ } )
+ public void testProducerOnNonBean() throws Exception
+ {
+ assert getCurrentManager().resolveByType(Cherry.class).isEmpty();
+ }
+
@Test(groups = "producerMethod")
@SpecAssertions( {
@SpecAssertion(section = "6.7", id = "n")
@@ -72,6 +84,7 @@
@Test(groups = "producerMethod")
@SpecAssertions({
@SpecAssertion(section = "3.4", id = "c"),
+ @SpecAssertion(section = "3.4.2", id = "a"),
@SpecAssertion(section = "2.3.1", id = "a")
})
public void testDefaultBindingType() throws Exception
@@ -137,7 +150,10 @@
}
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4.2", id = "be")
+ @SpecAssertions({
+ @SpecAssertion(section = "3.4.2", id = "be"),
+ @SpecAssertion(section = "3.4", id = "k")
+ })
public void testBindingType() throws Exception
{
assert getCurrentManager().resolveByType(Tarantula.class, TAME_LITERAL).size() == 1;
@@ -147,7 +163,10 @@
}
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4.2", id = "ba")
+ @SpecAssertions({
+ @SpecAssertion(section = "3.4.2", id = "ba"),
+ @SpecAssertion(section = "3.4", id = "k")
+ })
public void testScopeType() throws Exception
{
assert getCurrentManager().resolveByType(DaddyLongLegs.class).size() == 1;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/disposal/definition/DisposalMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/disposal/definition/DisposalMethodDefinitionTest.java 2009-05-21 12:08:27 UTC (rev 2697)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/disposal/definition/DisposalMethodDefinitionTest.java 2009-05-22 14:03:20 UTC (rev 2698)
@@ -40,16 +40,6 @@
}
/**
- * A bean may declare multiple disposal methods
- */
- @Test(groups = { "stub", "disposalMethod" })
- @SpecAssertion(section = "3.4.6", id = "e")
- public void testBeanCanDeclareMultipleDisposalMethods()
- {
- assert false;
- }
-
- /**
* Each disposal method must have exactly one disposed parameter, of the same
* type as the corresponding producer method return type
*/
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2697 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests: implementation/enterprise/lifecycle and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-05-21 08:08:27 -0400 (Thu, 21 May 2009)
New Revision: 2697
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Acorn.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/OakTree.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Pollen.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanViaXmlTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Den.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Fox.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/FoxLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Litter.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationIntegrationTest.java
Log:
A few additional tests for section 3
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java 2009-05-19 21:31:05 UTC (rev 2696)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -53,14 +53,6 @@
assert getCurrentManager().resolveByType(GiraffeLocal.class).size() > 0;
}
- @Test(groups = { "enterpriseBeans", "ejbjarxml", "stub" })
- @SpecAssertion(section = "3.3.2", id = "b")
- public void testEJBJARDefinedEnterpriseBean()
- {
- // TODO dupe?
- assert false;
- }
-
@Test(groups = { "enterpriseBeans" })
@SpecAssertions( {
@SpecAssertion(section = "3.2.1", id = "f"),
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanViaXmlTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanViaXmlTest.java 2009-05-19 21:31:05 UTC (rev 2696)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanViaXmlTest.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -41,8 +41,11 @@
public class EnterpriseBeanViaXmlTest extends AbstractJSR299Test
{
- @Test(groups = { "enterpriseBeans" })
- @SpecAssertions( { @SpecAssertion(section = "3.2.1", id = "n") })
+ @Test(groups = { "enterpriseBeans", "ejbjarxml" })
+ @SpecAssertions( {
+ @SpecAssertion(section = "3.2.1", id = "n"),
+ @SpecAssertion(section = "3.3.2", id = "b")
+ })
public void testEjbDeclaredInXmlNotSimpleBean()
{
Bean<ElephantLocal> elephantBean = getCurrentManager().resolveByType(ElephantLocal.class).iterator().next();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2009-05-19 21:31:05 UTC (rev 2696)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -43,13 +43,18 @@
* When the create() method of a Bean object that represents a stateful
* session bean that is called, the container creates and returns a session
* bean proxy, as defined in Section 3.3.9, "Session bean proxies".
+ * @throws Exception
+ *
+ * TODO Check this test once WBRI-269 is fixed
*/
- @Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "integration" })
+ @Test(groups = { "ri-broken", "enterpriseBeans", "clientProxy", "lifecycle", "integration" })
@SpecAssertions( {
- @SpecAssertion(section = "3.3.8", id = "a"),
+ @SpecAssertion(section = "3.3.8", id = "a"),
+ @SpecAssertion(section = "3.3.9", id = "a"),
+ @SpecAssertion(section = "3.3.9", id = "b"),
@SpecAssertion(section = "6", id = "a"),
@SpecAssertion(section = "6.5", id = "a") })
- public void testCreateSFSB()
+ public void testCreateSFSB() throws Exception
{
GrossStadt frankfurt = getCurrentManager().getInstanceByType(GrossStadt.class);
Bean<KleinStadt> stadtBean = getCurrentManager().resolveByType(KleinStadt.class).iterator().next();
@@ -70,6 +75,11 @@
Set<Class<?>> interfaces = new HashSet<Class<?>>(Arrays.asList(stadtInstance.getClass().getInterfaces()));
assert interfaces.contains(KleinStadt.class);
assert interfaces.contains(SchoeneStadt.class);
+
+ byte[] bytes = serialize(stadtInstance);
+ stadtInstance = (KleinStadt) deserialize(bytes);
+ assert getCurrentConfiguration().getBeans().isProxy(stadtInstance);
+
//frankfurt.dispose();
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Den.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Den.java 2009-05-19 21:31:05 UTC (rev 2696)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Den.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -1,10 +1,8 @@
package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
-import java.io.Serializable;
-public class Den implements Serializable
+public class Den
{
- private static final long serialVersionUID = 1L;
private String name;
public Den(String name)
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Fox.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Fox.java 2009-05-19 21:31:05 UTC (rev 2696)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Fox.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -1,16 +1,16 @@
package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
+import javax.context.SessionScoped;
import javax.ejb.Stateful;
-import javax.event.Observes;
import javax.inject.Disposes;
import javax.inject.Produces;
@Stateful
-@AnimalStereotype
+@SessionScoped
public class Fox implements FoxLocal
{
- @Produces
- public Den den = new Den("FoxDen");
+ @Produces @Tame
+ private Den den = new Den("FoxDen");
private int nextLitterSize;
@@ -48,13 +48,13 @@
this.nextLitterSize = nextLitterSize;
}
- @Produces
+ @Produces @Tame
public Litter produceLitter()
{
return new Litter(nextLitterSize);
}
- public void disposeLitter(@Disposes Litter litter)
+ public void disposeLitter(@Disposes @Tame Litter litter)
{
this.litterDisposed = true;
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/FoxLocal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/FoxLocal.java 2009-05-19 21:31:05 UTC (rev 2696)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/FoxLocal.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -6,18 +6,18 @@
public interface FoxLocal
{
- public abstract Den getDen();
+ public Den getDen();
- public abstract void setDen(Den den);
+ public void setDen(Den den);
- public abstract int getNextLitterSize();
+ public int getNextLitterSize();
- public abstract void setNextLitterSize(int nextLitterSize);
+ public void setNextLitterSize(int nextLitterSize);
- public abstract Litter produceLitter();
+ public Litter produceLitter();
- public abstract void disposeLitter(Litter litter);
+ public void disposeLitter(Litter litter);
- public abstract boolean isLitterDisposed();
+ public boolean isLitterDisposed();
}
\ No newline at end of file
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Litter.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Litter.java 2009-05-19 21:31:05 UTC (rev 2696)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/Litter.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -1,6 +1,7 @@
package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
-class Litter
+
+public class Litter
{
private int quantity;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java 2009-05-19 21:31:05 UTC (rev 2696)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -1,5 +1,6 @@
package org.jboss.jsr299.tck.tests.implementation.enterprise.newBean;
+import javax.inject.AnnotationLiteral;
import javax.inject.manager.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
@@ -33,7 +34,7 @@
*
* @throws Exception
*/
- @Test(groups = { "new", "ri-broken" })
+ @Test(groups = { "new" })
@SpecAssertion(section = "3.3.6", id = "j")
public void testNewBeanHasNoProducerMethods() throws Exception
{
@@ -47,13 +48,18 @@
FoxLocal newFox = getCurrentManager().getInstanceByType(FoxLocal.class, new NewLiteral());
fox.setNextLitterSize(3);
newFox.setNextLitterSize(5);
- Litter theOnlyLitter = getCurrentManager().getInstanceByType(Litter.class);
+ Litter theOnlyLitter = getCurrentManager().getInstanceByType(Litter.class, new AnnotationLiteral<Tame>(){});
assert theOnlyLitter.getQuantity() == fox.getNextLitterSize();
}
}.run();
}
+ /**
+ * TODO Once WBRI-208 is fixed, check this test too
+ *
+ * @throws Exception
+ */
@Test(groups = { "new", "ri-broken" })
@SpecAssertion(section = "3.3.6", id = "k")
public void testNewBeanHasNoProducerFields() throws Exception
@@ -67,7 +73,7 @@
FoxLocal fox = getCurrentManager().getInstanceByType(FoxLocal.class);
FoxLocal newFox = getCurrentManager().getInstanceByType(FoxLocal.class, new NewLiteral());
newFox.setDen(new Den("NewFoxDen"));
- Den theOnlyDen = getCurrentManager().getInstanceByType(Den.class);
+ Den theOnlyDen = getCurrentManager().getInstanceByType(Den.class, new AnnotationLiteral<Tame>(){});
assert theOnlyDen.getName().equals(fox.getDen().getName());
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Acorn.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Acorn.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Acorn.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.method.definition;
+
+class Acorn
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Acorn.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/OakTree.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/OakTree.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/OakTree.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.method.definition;
+
+import javax.context.Dependent;
+import javax.context.RequestScoped;
+import javax.inject.Produces;
+
+@AnotherDeploymentType
+class OakTree
+{
+ @Produces @Dependent public Acorn growAcorn()
+ {
+ return null;
+ }
+
+ @Produces @RequestScoped public Pollen pollinate()
+ {
+ return null;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/OakTree.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Pollen.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Pollen.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Pollen.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.method.definition;
+
+class Pollen
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/Pollen.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-05-19 21:31:05 UTC (rev 2696)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/definition/ProducerMethodDefinitionTest.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -5,6 +5,7 @@
import javax.context.RequestScoped;
import javax.inject.AnnotationLiteral;
import javax.inject.Current;
+import javax.inject.IllegalProductException;
import javax.inject.TypeLiteral;
import javax.inject.manager.Bean;
@@ -70,7 +71,7 @@
@Test(groups = "producerMethod")
@SpecAssertions({
- @SpecAssertion(section = "3.4", id = "b"),
+ @SpecAssertion(section = "3.4", id = "c"),
@SpecAssertion(section = "2.3.1", id = "a")
})
public void testDefaultBindingType() throws Exception
@@ -236,4 +237,19 @@
Tarantula instance = getCurrentManager().getInstance(tarantula);
assert instance.getDeathsCaused() == 1;
}
+
+ @Test
+ @SpecAssertion(section = "3.4", id = "e")
+ public void testDependentProducerReturnsNullValue()
+ {
+ assert getCurrentManager().getInstanceByType(Acorn.class) == null;
+ }
+
+ @Test(groups = { "ri-broken" }, expectedExceptions = { IllegalProductException.class })
+ @SpecAssertion(section = "3.4", id = "f")
+ public void testNonDependentProducerReturnsNullValue()
+ {
+ getCurrentManager().getInstanceByType(Pollen.class);
+ assert false;
+ }
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationIntegrationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationIntegrationTest.java 2009-05-19 21:31:05 UTC (rev 2696)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationIntegrationTest.java 2009-05-21 12:08:27 UTC (rev 2697)
@@ -26,7 +26,8 @@
@Test
@SpecAssertions({
@SpecAssertion(section = "4.3.1", id = "f"),
- @SpecAssertion(section = "3.3.7", id = "b")
+ @SpecAssertion(section = "3.3.7", id = "b"),
+ @SpecAssertion(section = "3.3.7", id = "c")
})
public void testSpecializedBeanNotInstantiated() throws Exception
{
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2696 - ri/trunk/version-matrix.
by webbeans-commits@lists.jboss.org
Author: peteroyle
Date: 2009-05-19 17:31:05 -0400 (Tue, 19 May 2009)
New Revision: 2696
Modified:
ri/trunk/version-matrix/pom.xml
Log:
WebBeans SE version back to 1.0.0-SNAPSHOT (was BETA1)
Modified: ri/trunk/version-matrix/pom.xml
===================================================================
--- ri/trunk/version-matrix/pom.xml 2009-05-19 21:30:34 UTC (rev 2695)
+++ ri/trunk/version-matrix/pom.xml 2009-05-19 21:31:05 UTC (rev 2696)
@@ -50,7 +50,7 @@
<jsr299.tck.version>1.0.0-SNAPSHOT</jsr299.tck.version>
<webbeans.version>1.0.0-SNAPSHOT</webbeans.version>
<webbeans.servlet.version>1.0.0.CR1</webbeans.servlet.version>
- <webbeans.se.version>1.0.0.BETA1</webbeans.se.version>
+ <webbeans.se.version>1.0.0-SNAPSHOT</webbeans.se.version>
<jboss.test.harness.version>1.0.0.BETA2</jboss.test.harness.version>
</properties>
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2695 - in examples/trunk/se/hello-world/src/main/resources: META-INF and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: peteroyle
Date: 2009-05-19 17:30:34 -0400 (Tue, 19 May 2009)
New Revision: 2695
Added:
examples/trunk/se/hello-world/src/main/resources/META-INF/
examples/trunk/se/hello-world/src/main/resources/META-INF/beans.xml
Removed:
examples/trunk/se/hello-world/src/main/resources/beans.xml
Log:
Moved beans.xml into META-INF directory, as per spec.
Copied: examples/trunk/se/hello-world/src/main/resources/META-INF/beans.xml (from rev 2690, examples/trunk/se/hello-world/src/main/resources/beans.xml)
===================================================================
--- examples/trunk/se/hello-world/src/main/resources/META-INF/beans.xml (rev 0)
+++ examples/trunk/se/hello-world/src/main/resources/META-INF/beans.xml 2009-05-19 21:30:34 UTC (rev 2695)
@@ -0,0 +1,19 @@
+<!--
+
+ JBoss, Home of Professional Open Source
+ Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ by the @authors tag. See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<beans></beans>
Deleted: examples/trunk/se/hello-world/src/main/resources/beans.xml
===================================================================
--- examples/trunk/se/hello-world/src/main/resources/beans.xml 2009-05-19 21:20:54 UTC (rev 2694)
+++ examples/trunk/se/hello-world/src/main/resources/beans.xml 2009-05-19 21:30:34 UTC (rev 2695)
@@ -1,19 +0,0 @@
-<!--
-
- JBoss, Home of Professional Open Source
- Copyright 2008, Red Hat Middleware LLC, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans></beans>
15 years, 8 months
[webbeans-commits] Webbeans SVN: r2694 - in examples/trunk/se/numberguess/src/main/resources: META-INF and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: peteroyle
Date: 2009-05-19 17:20:54 -0400 (Tue, 19 May 2009)
New Revision: 2694
Added:
examples/trunk/se/numberguess/src/main/resources/META-INF/
examples/trunk/se/numberguess/src/main/resources/META-INF/beans.xml
Removed:
examples/trunk/se/numberguess/src/main/resources/beans.xml
Log:
Moved beans.xml into META-INF directory, as per spec.
Copied: examples/trunk/se/numberguess/src/main/resources/META-INF/beans.xml (from rev 2690, examples/trunk/se/numberguess/src/main/resources/beans.xml)
===================================================================
--- examples/trunk/se/numberguess/src/main/resources/META-INF/beans.xml (rev 0)
+++ examples/trunk/se/numberguess/src/main/resources/META-INF/beans.xml 2009-05-19 21:20:54 UTC (rev 2694)
@@ -0,0 +1,19 @@
+<!--
+
+ JBoss, Home of Professional Open Source
+ Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ by the @authors tag. See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<beans></beans>
Deleted: examples/trunk/se/numberguess/src/main/resources/beans.xml
===================================================================
--- examples/trunk/se/numberguess/src/main/resources/beans.xml 2009-05-19 20:22:16 UTC (rev 2693)
+++ examples/trunk/se/numberguess/src/main/resources/beans.xml 2009-05-19 21:20:54 UTC (rev 2694)
@@ -1,19 +0,0 @@
-<!--
-
- JBoss, Home of Professional Open Source
- Copyright 2008, Red Hat Middleware LLC, and individual contributors
- by the @authors tag. See the copyright.txt in the distribution for a
- full listing of individual contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans></beans>
15 years, 8 months