Author: pete.muir(a)jboss.org
Date: 2009-03-13 10:37:24 -0400 (Fri, 13 Mar 2009)
New Revision: 1973
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/examples/MockExampleTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/AbstractWebBeansTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/StandaloneContainersImpl.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DiscoverFailsBootstrapTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/XmlBootstrapTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/BootstrapTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Elephant.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/ElephantLocal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Hound.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/HoundLocal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Panther.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/PantherLocal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Synchronous.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tame.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tiger.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/TigerLocal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Animal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/BootstrapTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Elephant.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ElephantLocal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Hound.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/HoundLocal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Panther.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/PantherLocal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Salmon.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ScottishFish.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/SeaBass.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Sole.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Synchronous.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tame.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tiger.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/TigerLocal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tuna.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Whitefish.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Animal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/BootstrapTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Salmon.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/ScottishFish.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/SeaBass.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Sole.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Tuna.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Whitefish.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/BootstrapTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Hound.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/HoundLocal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Tame.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Animal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/BootstrapTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlyAnimal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlySpider.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DefangedTarantula.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Spider.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tame.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tarantula.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/TarantulaProducer.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/BootstrapTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/Tuna.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/Large.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLooping.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLooping.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingDependent.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingDependent1.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingNormal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingNormal1.java
ri/trunk/impl/src/test/resources/META-INF/web-beans-tck.properties
ri/trunk/impl/src/test/resources/org/jboss/testharness/
ri/trunk/impl/src/test/resources/org/jboss/testharness/impl/
ri/trunk/impl/src/test/resources/org/jboss/testharness/impl/packaging/
ri/trunk/impl/src/test/resources/org/jboss/testharness/impl/packaging/ear/
ri/trunk/impl/src/test/resources/org/jboss/testharness/impl/packaging/ear/ejb-jar.xml
ri/trunk/impl/src/test/resources/org/jboss/testharness/impl/packaging/jsr299/
ri/trunk/impl/src/test/resources/org/jboss/webbeans/test/examples/
ri/trunk/impl/src/test/resources/org/jboss/webbeans/test/examples/beans.xml
Removed:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlyAnimal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlySpider.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DefangedTarantula.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Elephant.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Hound.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/LadybirdSpider.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Panther.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Salmon.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ScottishFish.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/SeaBass.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Sole.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Spider.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Synchronous.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tame.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tarantula.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/TarantulaProducer.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Whitefish.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/event/
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Bad.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/BadLocal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/RemoveMethodTests.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Animal.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/AnotherDeploymentType.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Chunky.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Cod.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Expensive.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Farmer.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/FishFarm.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Haddock.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Salmon.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/ScottishFish.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/SeaBass.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Sole.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Tuna.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Whitefish.java
Modified:
ri/trunk/impl/pom.xml
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/examples/ExampleTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BootstrapTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/context/ContextTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/ExceptionHandlingTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/ShipProducer_Broken.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingNormalProducer.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingDependentProducer.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingNormalProducer.java
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/BeansXmlParserTest.java
Log:
use test harness, delete redundant tests
Modified: ri/trunk/impl/pom.xml
===================================================================
--- ri/trunk/impl/pom.xml 2009-03-13 14:35:31 UTC (rev 1972)
+++ ri/trunk/impl/pom.xml 2009-03-13 14:37:24 UTC (rev 1973)
@@ -111,6 +111,12 @@
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>org.jboss.test-harness</groupId>
+ <artifactId>jboss-test-harness</artifactId>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
<build>
Modified: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/examples/ExampleTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/examples/ExampleTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/examples/ExampleTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,18 +1,14 @@
package org.jboss.webbeans.test.examples;
-import java.util.Arrays;
-
-import javax.inject.Production;
-import javax.inject.Standard;
-
-import org.jboss.webbeans.test.unit.AbstractTest;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.Test;
-public class ExampleTest extends AbstractTest
+@Artifact
+public class ExampleTest extends AbstractWebBeansTest
{
@Test
public void testGameGenerator() throws Exception {
- setupGameGenerator();
new RunInDependentContext()
{
@@ -33,33 +29,8 @@
}.run();
}
- private void setupGameGenerator() throws NoSuchMethodException
- {
- deployBeans(Game.class, Generator.class);
- }
-
@Test
- public void testMockSentenceTranslator() throws Exception {
-
- manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, Production.class,
Mock.class));
- setupTextTranslator();
-
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- TextTranslator tt2 = manager.getInstanceByType(TextTranslator.class);
- assert "Lorem ipsum dolor sit amet. Lorem ipsum dolor sit
amet.".equals( tt2.translate("Hello world. How's tricks?") );
- }
-
- }.run();
- }
-
- @Test
public void testSentenceTranslator() throws Exception {
- setupTextTranslator();
new RunInDependentContext()
{
@@ -82,9 +53,4 @@
}.run();
}
- private void setupTextTranslator()
- {
- deployBeans(SentenceParser.class, SentenceTranslator.class,
MockSentenceTranslator.class, TextTranslator.class);
- }
-
}
Added: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/examples/MockExampleTest.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/examples/MockExampleTest.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/examples/MockExampleTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,31 @@
+package org.jboss.webbeans.test.examples;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)BeansXml("beans.xml")
+public class MockExampleTest extends AbstractWebBeansTest
+{
+
+ @Test
+ public void testMockSentenceTranslator() throws Exception {
+
+ //manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, Production.class,
Mock.class));
+
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ TextTranslator tt2 = manager.getInstanceByType(TextTranslator.class);
+ assert "Lorem ipsum dolor sit amet. Lorem ipsum dolor sit
amet.".equals( tt2.translate("Hello world. How's tricks?") );
+ }
+
+ }.run();
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/examples/MockExampleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,120 +0,0 @@
-package org.jboss.webbeans.test.unit;
-
-import java.io.IOException;
-import java.lang.annotation.Annotation;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.inject.Production;
-import javax.inject.Standard;
-
-import org.jboss.webbeans.ManagerImpl;
-import org.jboss.webbeans.context.DependentContext;
-import org.jboss.webbeans.mock.MockLifecycle;
-import org.jboss.webbeans.mock.MockWebBeanDiscovery;
-import org.jboss.webbeans.util.EnumerationIterable;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-
-public class AbstractTest
-{
-
- protected abstract static class RunInDependentContext
- {
-
- protected void setup()
- {
- DependentContext.INSTANCE.setActive(true);
- }
-
- protected void cleanup()
- {
- DependentContext.INSTANCE.setActive(false);
- }
-
- public final void run() throws Exception
- {
- try
- {
- setup();
- execute();
- }
- finally
- {
- cleanup();
- }
- }
-
- protected abstract void execute() throws Exception;
-
- }
-
- protected static final int BUILT_IN_BEANS = 3;
-
- protected ManagerImpl manager;
- protected MockLifecycle lifecycle;
- protected MockWebBeanDiscovery discovery;
-
- public static boolean visited = false;
-
- @BeforeMethod
- public void before() throws Exception
- {
- lifecycle = new MockLifecycle();
- this.discovery = lifecycle.getWebBeanDiscovery();
- this.manager = lifecycle.getBootstrap().getManager();
- lifecycle.beginApplication();
- lifecycle.beginSession();
- lifecycle.beginRequest();
- }
-
- @AfterMethod
- public void after() throws Exception
- {
- lifecycle.endRequest();
- lifecycle.endSession();
- lifecycle.endApplication();
- }
-
-
- protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
- {
- return getDefaultDeploymentTypes();
- }
-
- @SuppressWarnings("unchecked")
- protected final List<Class<? extends Annotation>>
getDefaultDeploymentTypes()
- {
- return Arrays.asList(Standard.class, Production.class);
- }
-
- protected void deployBeans(Class<?>... classes)
- {
- discovery.setWebBeanClasses(Arrays.asList(classes));
- lifecycle.beginApplication();
- lifecycle.beginSession();
- lifecycle.beginRequest();
- }
-
-
- protected Iterable<URL> getResources(String name)
- {
- if (name.startsWith("/"))
- {
- name = name.substring(1);
- }
- else
- {
- name = getClass().getPackage().getName().replace(".", "/") +
"/" + name;
- }
- try
- {
- return new
EnumerationIterable<URL>(getClass().getClassLoader().getResources(name));
- }
- catch (IOException e)
- {
- throw new RuntimeException("Error loading resource from classloader" +
name, e);
- }
- }
-}
Copied: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/AbstractWebBeansTest.java
(from rev 1943,
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java)
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/AbstractWebBeansTest.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/AbstractWebBeansTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,110 @@
+package org.jboss.webbeans.test.unit;
+
+import java.io.IOException;
+import java.lang.annotation.Annotation;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.inject.Production;
+import javax.inject.Standard;
+
+import org.jboss.testharness.AbstractTest;
+import org.jboss.webbeans.CurrentManager;
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.context.DependentContext;
+import org.jboss.webbeans.util.EnumerationIterable;
+import org.testng.ITestContext;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+
+public abstract class AbstractWebBeansTest extends AbstractTest
+{
+
+ protected abstract static class RunInDependentContext
+ {
+
+ protected void setup()
+ {
+ DependentContext.INSTANCE.setActive(true);
+ }
+
+ protected void cleanup()
+ {
+ DependentContext.INSTANCE.setActive(false);
+ }
+
+ public final void run() throws Exception
+ {
+ try
+ {
+ setup();
+ execute();
+ }
+ finally
+ {
+ cleanup();
+ }
+ }
+
+ protected abstract void execute() throws Exception;
+
+ }
+
+ protected static final int BUILT_IN_BEANS = 3;
+
+ protected ManagerImpl manager;
+
+ public static boolean visited = false;
+
+ @Override
+ public void beforeSuite(ITestContext context) throws Exception
+ {
+ getCurrentConfiguration().setStandaloneContainers(new StandaloneContainersImpl());
+ }
+
+ @BeforeMethod
+ public void before() throws Exception
+ {
+ this.manager = CurrentManager.rootManager();
+ }
+
+ @AfterMethod
+ public void after() throws Exception
+ {
+ manager = null;
+ }
+
+
+ protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
+ {
+ return getDefaultDeploymentTypes();
+ }
+
+ @SuppressWarnings("unchecked")
+ protected final List<Class<? extends Annotation>>
getDefaultDeploymentTypes()
+ {
+ return Arrays.asList(Standard.class, Production.class);
+ }
+
+ protected Iterable<URL> getResources(String name)
+ {
+ if (name.startsWith("/"))
+ {
+ name = name.substring(1);
+ }
+ else
+ {
+ name = getClass().getPackage().getName().replace(".", "/") +
"/" + name;
+ }
+ try
+ {
+ return new
EnumerationIterable<URL>(getClass().getClassLoader().getResources(name));
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Error loading resource from classloader" +
name, e);
+ }
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/AbstractWebBeansTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/StandaloneContainersImpl.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/StandaloneContainersImpl.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/StandaloneContainersImpl.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,62 @@
+package org.jboss.webbeans.test.unit;
+
+import java.net.URL;
+
+import org.jboss.testharness.api.DeploymentException;
+import org.jboss.testharness.spi.StandaloneContainers;
+import org.jboss.webbeans.CurrentManager;
+import org.jboss.webbeans.mock.MockLifecycle;
+import org.jboss.webbeans.mock.MockWebBeanDiscovery;
+
+public class StandaloneContainersImpl implements StandaloneContainers
+{
+
+ private MockLifecycle lifecycle;
+
+ public void deploy(Iterable<Class<?>> classes, Iterable<URL>
beansXml) throws DeploymentException
+ {
+ this.lifecycle = new MockLifecycle();
+ try
+ {
+ MockWebBeanDiscovery discovery = lifecycle.getWebBeanDiscovery();
+ discovery.setWebBeanClasses(classes);
+ if (beansXml != null)
+ {
+ discovery.setWebBeansXmlFiles(beansXml);
+ }
+ lifecycle.beginApplication();
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException("Error deploying beans", e);
+ }
+ lifecycle.beginSession();
+ lifecycle.beginRequest();
+ }
+
+ public void deploy(Iterable<Class<?>> classes) throws DeploymentException
+ {
+ deploy(classes, null);
+ }
+
+ public void cleanup()
+ {
+ // Np-op
+
+ }
+
+ public void setup()
+ {
+ // No-op
+ }
+
+ public void undeploy()
+ {
+ lifecycle.endRequest();
+ lifecycle.endSession();
+ lifecycle.endApplication();
+ CurrentManager.setRootManager(null);
+ lifecycle = null;
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/StandaloneContainersImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-interface Animal
-{
-
-}
Added: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+interface Animal
+{
+
+}
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BootstrapTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BootstrapTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BootstrapTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,280 +1,31 @@
package org.jboss.webbeans.test.unit.bootstrap;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Production;
-import javax.inject.Standard;
-import javax.inject.manager.Bean;
-
-import org.jboss.webbeans.WebBean;
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.bean.ProducerMethodBean;
-import org.jboss.webbeans.bean.RIBean;
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.mock.MockLifecycle;
-import org.jboss.webbeans.test.unit.AbstractTest;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.Test;
-public class BootstrapTest extends AbstractTest
+@Artifact
+(a)Packaging(PackagingType.EAR)
+public class BootstrapTest extends AbstractWebBeansTest
{
- @Test
- public void testDeploymentTypesLoadedFromBeansXml()
- {
- discovery.setWebBeansXmlFiles(getResources("test-beans.xml"));
- deployBeans();
- assert manager.getEnabledDeploymentTypes().size() == 4;
- assert manager.getEnabledDeploymentTypes().get(0).equals(Standard.class);
- assert manager.getEnabledDeploymentTypes().get(1).equals(WebBean.class);
- assert manager.getEnabledDeploymentTypes().get(2).equals(Production.class);
- assert
manager.getEnabledDeploymentTypes().get(3).equals(AnotherDeploymentType.class);
- }
-
@Test(groups="bootstrap")
- public void testSingleSimpleBean()
- {
- deployBeans(Tuna.class);
- List<Bean<?>> beans = manager.getBeans();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
- for (Bean<?> bean : beans)
- {
- if (bean instanceof RIBean)
- {
- classes.put(((RIBean<?>) bean).getType(), bean);
- }
- }
- assert classes.containsKey(Tuna.class);
- }
-
- @Test(groups="bootstrap")
- public void testSingleEnterpriseBean()
- {
- deployBeans(Hound.class);
- List<Bean<?>> beans = manager.getBeans();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
- for (Bean<?> bean : beans)
- {
- if (bean instanceof RIBean)
- {
- classes.put(((RIBean<?>) bean).getType(), bean);
- }
- }
- assert classes.containsKey(Hound.class);
- }
-
- @Test(groups="bootstrap")
- public void testMultipleSimpleBean()
- {
- deployBeans(Tuna.class, Salmon.class, SeaBass.class, Sole.class);
- List<Bean<?>> beans = manager.getBeans();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
- for (Bean<?> bean : beans)
- {
- if (bean instanceof RIBean)
- {
- classes.put(((RIBean<?>) bean).getType(), bean);
- }
- }
- assert classes.containsKey(Tuna.class);
- assert classes.containsKey(Salmon.class);
- assert classes.containsKey(SeaBass.class);
- assert classes.containsKey(Sole.class);
-
- assert classes.get(Tuna.class) instanceof SimpleBean;
- assert classes.get(Salmon.class) instanceof SimpleBean;
- assert classes.get(SeaBass.class) instanceof SimpleBean;
- assert classes.get(Sole.class) instanceof SimpleBean;
- }
-
- @Test(groups="bootstrap")
- public void testProducerMethodBean()
- {
- deployBeans(TarantulaProducer.class);
- List<Bean<?>> beans = manager.getBeans();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
- for (Bean<?> bean : beans)
- {
- if (bean instanceof RIBean)
- {
- classes.put(((RIBean<?>) bean).getType(), bean);
- }
- }
- assert classes.containsKey(TarantulaProducer.class);
- assert classes.containsKey(Tarantula.class);
-
- assert classes.get(TarantulaProducer.class) instanceof SimpleBean;
- assert classes.get(Tarantula.class) instanceof ProducerMethodBean;
- }
-
- @Test(groups="bootstrap")
- public void testMultipleEnterpriseBean()
- {
- deployBeans(Hound.class, Elephant.class, Panther.class, Tiger.class);
- List<Bean<?>> beans = manager.getBeans();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
- for (Bean<?> bean : beans)
- {
- if (bean instanceof RIBean)
- {
- classes.put(((RIBean<?>) bean).getType(), bean);
- }
- }
- assert classes.containsKey(Hound.class);
- assert classes.containsKey(Elephant.class);
- assert classes.containsKey(Panther.class);
- assert classes.containsKey(Tiger.class);
-
- assert classes.get(Hound.class) instanceof EnterpriseBean;
- assert classes.get(Elephant.class) instanceof EnterpriseBean;
- assert classes.get(Panther.class) instanceof EnterpriseBean;
- assert classes.get(Tiger.class) instanceof EnterpriseBean;
- }
-
- @Test(groups="bootstrap")
- public void testMultipleEnterpriseAndSimpleBean()
- {
- deployBeans(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class,
Salmon.class, SeaBass.class, Sole.class);
- List<Bean<?>> beans = manager.getBeans();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
- for (Bean<?> bean : beans)
- {
- if (bean instanceof RIBean)
- {
- classes.put(((RIBean<?>) bean).getType(), bean);
- }
- }
- assert classes.containsKey(Hound.class);
- assert classes.containsKey(Elephant.class);
- assert classes.containsKey(Panther.class);
- assert classes.containsKey(Tiger.class);
- assert classes.containsKey(Tuna.class);
- assert classes.containsKey(Salmon.class);
- assert classes.containsKey(SeaBass.class);
- assert classes.containsKey(Sole.class);
-
- assert classes.get(Hound.class) instanceof EnterpriseBean;
- assert classes.get(Elephant.class) instanceof EnterpriseBean;
- assert classes.get(Panther.class) instanceof EnterpriseBean;
- assert classes.get(Tiger.class) instanceof EnterpriseBean;
- assert classes.get(Tuna.class) instanceof SimpleBean;
- assert classes.get(Salmon.class) instanceof SimpleBean;
- assert classes.get(SeaBass.class) instanceof SimpleBean;
- assert classes.get(Sole.class) instanceof SimpleBean;
- }
-
- @Test(groups="bootstrap")
- public void testRegisterProducerMethodBean()
- {
- deployBeans(TarantulaProducer.class);
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
- for (Bean<?> bean : manager.getBeans())
- {
- if (bean instanceof RIBean)
- {
- classes.put(((RIBean<?>) bean).getType(), bean);
- }
- }
- assert classes.containsKey(TarantulaProducer.class);
- assert classes.containsKey(Tarantula.class);
-
-
- assert classes.get(TarantulaProducer.class) instanceof SimpleBean;
- assert classes.get(Tarantula.class) instanceof ProducerMethodBean;
- }
-
- @Test(groups="bootstrap")
- public void testRegisterMultipleEnterpriseAndSimpleBean()
- {
- deployBeans(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class,
Salmon.class, SeaBass.class, Sole.class);
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
- for (Bean<?> bean : manager.getBeans())
- {
- if (bean instanceof RIBean)
- {
- classes.put(((RIBean<?>) bean).getType(), bean);
- }
- }
- assert classes.containsKey(Hound.class);
- assert classes.containsKey(Elephant.class);
- assert classes.containsKey(Panther.class);
- assert classes.containsKey(Tiger.class);
- assert classes.containsKey(Tuna.class);
- assert classes.containsKey(Salmon.class);
- assert classes.containsKey(SeaBass.class);
- assert classes.containsKey(Sole.class);
-
- assert classes.get(Hound.class) instanceof EnterpriseBean;
- assert classes.get(Elephant.class) instanceof EnterpriseBean;
- assert classes.get(Panther.class) instanceof EnterpriseBean;
- assert classes.get(Tiger.class) instanceof EnterpriseBean;
- assert classes.get(Tuna.class) instanceof SimpleBean;
- assert classes.get(Salmon.class) instanceof SimpleBean;
- assert classes.get(SeaBass.class) instanceof SimpleBean;
- assert classes.get(Sole.class) instanceof SimpleBean;
- }
-
- @Test(groups="bootstrap", expectedExceptions=IllegalStateException.class)
- public void testDiscoverFails()
- {
- deployBeans();
- MockLifecycle lifecycle = new MockLifecycle(null);
- lifecycle.beginApplication();
- }
-
- @Test(groups="bootstrap")
- public void testDiscover()
- {
- deployBeans(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class,
Salmon.class, SeaBass.class, Sole.class);
-
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
- for (Bean<?> bean : manager.getBeans())
- {
- if (bean instanceof RIBean)
- {
- classes.put(((RIBean<?>) bean).getType(), bean);
- }
- }
- assert classes.containsKey(Hound.class);
- assert classes.containsKey(Elephant.class);
- assert classes.containsKey(Panther.class);
- assert classes.containsKey(Tiger.class);
- assert classes.containsKey(Tuna.class);
- assert classes.containsKey(Salmon.class);
- assert classes.containsKey(SeaBass.class);
- assert classes.containsKey(Sole.class);
-
- assert classes.get(Hound.class) instanceof EnterpriseBean;
- assert classes.get(Elephant.class) instanceof EnterpriseBean;
- assert classes.get(Panther.class) instanceof EnterpriseBean;
- assert classes.get(Tiger.class) instanceof EnterpriseBean;
- assert classes.get(Tuna.class) instanceof SimpleBean;
- assert classes.get(Salmon.class) instanceof SimpleBean;
- assert classes.get(SeaBass.class) instanceof SimpleBean;
- assert classes.get(Sole.class) instanceof SimpleBean;
- }
-
- @Test(groups="bootstrap")
public void testInitializedEvent()
{
- assert !InitializedObserver.observered;
- deployBeans(InitializedObserver.class);
-
assert InitializedObserver.observered;
}
@Test(groups="bootstrap")
public void testRequestContextActiveDuringInitializtionEvent()
{
- deployBeans(InitializedObserverWhichUsesRequestContext.class, Tuna.class);
+ assert InitializedObserverWhichUsesRequestContext.name == new Tuna().getName();
}
@Test(groups={"bootstrap"})
public void testApplicationContextActiveDuringInitializtionEvent()
{
- Cow.mooed = false;
- deployBeans(InitializedObserverWhichUsesApplicationContext.class, Cow.class);
assert Cow.mooed;
}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlyAnimal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlyAnimal.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlyAnimal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-interface DeadlyAnimal
-{
-
-}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlySpider.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlySpider.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlySpider.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-interface DeadlySpider extends DeadlyAnimal
-{
-
-}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DefangedTarantula.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DefangedTarantula.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DefangedTarantula.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-class DefangedTarantula extends Tarantula
-{
-
-}
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DiscoverFailsBootstrapTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DiscoverFailsBootstrapTest.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DiscoverFailsBootstrapTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import org.jboss.webbeans.mock.MockLifecycle;
+import org.testng.annotations.Test;
+
+public class DiscoverFailsBootstrapTest
+{
+
+ @Test(groups="bootstrap", expectedExceptions=IllegalStateException.class)
+ public void testDiscoverFails()
+ {
+ MockLifecycle lifecycle = new MockLifecycle(null);
+ lifecycle.beginApplication();
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DiscoverFailsBootstrapTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Elephant.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Elephant.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Elephant.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,24 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.inject.Production;
-
-@Production
-@Stateful
-class Elephant
-{
-
- @Remove
- public void remove1()
- {
-
- }
-
- @Remove
- public void remove2()
- {
-
- }
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Hound.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Hound.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Hound.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,16 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-import javax.annotation.Named;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-
-@Stateful
-@Tame
-@Named("Pongo")
-class Hound
-{
- @Remove
- public void bye() {
- }
-
-}
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -8,11 +8,13 @@
class InitializedObserverWhichUsesRequestContext
{
+ public static String name;
+
@Current Tuna tuna;
public void observeInitialized(@Observes @Initialized Manager manager)
{
- tuna.getName();
+ name = tuna.getName();
}
}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/LadybirdSpider.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/LadybirdSpider.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/LadybirdSpider.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-import javax.context.ApplicationScoped;
-
-@ApplicationScoped
-class LadybirdSpider extends Spider
-{
-
- public void spinWeb()
- {
-
- }
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Panther.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Panther.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Panther.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,18 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.inject.Production;
-
-@Production
-@Stateful
-class Panther
-{
-
- @Remove
- public void remove(String foo)
- {
-
- }
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Salmon.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Salmon.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Salmon.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-import javax.annotation.Named;
-import javax.inject.Production;
-
-@Production
-@Named
-class Salmon implements ScottishFish
-{
-
-}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ScottishFish.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ScottishFish.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ScottishFish.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-interface ScottishFish extends Animal
-{
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/SeaBass.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/SeaBass.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/SeaBass.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-import javax.context.RequestScoped;
-import javax.inject.Production;
-
-@Production
-@RequestScoped
-class SeaBass implements Animal
-{
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Sole.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Sole.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Sole.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-import javax.annotation.Named;
-import javax.inject.Production;
-
-@Production
-@Whitefish
-@Named("whitefish")
-class Sole implements ScottishFish
-{
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Spider.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Spider.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Spider.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-class Spider implements Animal
-{
-
- public final void layEggs()
- {
-
- }
-
-}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Synchronous.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Synchronous.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Synchronous.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,21 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-@interface Synchronous
-{
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tame.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tame.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tame.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,22 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-@interface Tame
-{
-
-}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tarantula.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tarantula.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tarantula.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-class Tarantula extends Spider implements DeadlySpider
-{
-
-}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/TarantulaProducer.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/TarantulaProducer.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/TarantulaProducer.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,13 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-import javax.inject.Produces;
-
-public class TarantulaProducer
-{
-
- @Produces @Tame public Tarantula produceTameTarantula()
- {
- return new DefangedTarantula();
- }
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,19 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.inject.Production;
-
-@Production
-@Stateful
-@Synchronous
-public class Tiger
-{
-
- @Remove
- public void remove()
- {
-
- }
-
-}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Whitefish.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Whitefish.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Whitefish.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,22 +0,0 @@
-package org.jboss.webbeans.test.unit.bootstrap;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface Whitefish
-{
-
-}
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/XmlBootstrapTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/XmlBootstrapTest.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/XmlBootstrapTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,30 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.inject.Production;
+import javax.inject.Standard;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.webbeans.WebBean;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)Packaging(PackagingType.EAR)
+(a)BeansXml("test-beans.xml")
+public class XmlBootstrapTest extends AbstractWebBeansTest
+{
+
+ @Test
+ public void testDeploymentTypesLoadedFromBeansXml()
+ {
+ assert manager.getEnabledDeploymentTypes().size() == 4;
+ assert manager.getEnabledDeploymentTypes().get(0).equals(Standard.class);
+ assert manager.getEnabledDeploymentTypes().get(1).equals(WebBean.class);
+ assert manager.getEnabledDeploymentTypes().get(2).equals(Production.class);
+ assert
manager.getEnabledDeploymentTypes().get(3).equals(AnotherDeploymentType.class);
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/XmlBootstrapTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/BootstrapTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/BootstrapTest.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/BootstrapTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,45 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.inject.manager.Bean;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.webbeans.bean.EnterpriseBean;
+import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)Packaging(PackagingType.EAR)
+public class BootstrapTest extends AbstractWebBeansTest
+{
+
+ @Test(groups="bootstrap")
+ public void testMultipleEnterpriseBean()
+ {
+ List<Bean<?>> beans = manager.getBeans();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof RIBean)
+ {
+ classes.put(((RIBean<?>) bean).getType(), bean);
+ }
+ }
+ assert classes.containsKey(Hound.class);
+ assert classes.containsKey(Elephant.class);
+ assert classes.containsKey(Panther.class);
+ assert classes.containsKey(Tiger.class);
+
+ assert classes.get(Hound.class) instanceof EnterpriseBean;
+ assert classes.get(Elephant.class) instanceof EnterpriseBean;
+ assert classes.get(Panther.class) instanceof EnterpriseBean;
+ assert classes.get(Tiger.class) instanceof EnterpriseBean;
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/BootstrapTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Elephant.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Elephant.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Elephant.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,24 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Production;
+
+@Production
+@Stateful
+class Elephant implements ElephantLocal
+{
+
+ @Remove
+ public void remove1()
+ {
+
+ }
+
+ @Remove
+ public void remove2()
+ {
+
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Elephant.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/ElephantLocal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/ElephantLocal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/ElephantLocal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface ElephantLocal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/ElephantLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Hound.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Hound.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Hound.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+import javax.annotation.Named;
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+@Stateful
+@Tame
+@Named("Pongo")
+class Hound implements HoundLocal
+{
+ @Remove
+ public void bye() {
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Hound.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/HoundLocal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/HoundLocal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/HoundLocal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface HoundLocal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/HoundLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Panther.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Panther.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Panther.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Production;
+
+@Production
+@Stateful
+class Panther implements PantherLocal
+{
+
+ @Remove
+ public void remove(String foo)
+ {
+
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Panther.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/PantherLocal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/PantherLocal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/PantherLocal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+public interface PantherLocal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/PantherLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Synchronous.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Synchronous.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Synchronous.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Synchronous
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Synchronous.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tame.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tame.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tame.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Tame
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tame.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tiger.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tiger.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tiger.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Production;
+
+@Production
+@Stateful
+@Synchronous
+public class Tiger implements TigerLocal
+{
+
+ @Remove
+ public void remove()
+ {
+
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/Tiger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/TigerLocal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/TigerLocal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/TigerLocal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface TigerLocal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterprise/TigerLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Animal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Animal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Animal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+interface Animal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/BootstrapTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/BootstrapTest.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/BootstrapTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,54 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.inject.manager.Bean;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.webbeans.bean.EnterpriseBean;
+import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.bean.SimpleBean;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)Packaging(PackagingType.EAR)
+public class BootstrapTest extends AbstractWebBeansTest
+{
+
+ @Test(groups="bootstrap")
+ public void testMultipleEnterpriseAndSimpleBean()
+ {
+ List<Bean<?>> beans = manager.getBeans();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof RIBean)
+ {
+ classes.put(((RIBean<?>) bean).getType(), bean);
+ }
+ }
+ assert classes.containsKey(Hound.class);
+ assert classes.containsKey(Elephant.class);
+ assert classes.containsKey(Panther.class);
+ assert classes.containsKey(Tiger.class);
+ assert classes.containsKey(Tuna.class);
+ assert classes.containsKey(Salmon.class);
+ assert classes.containsKey(SeaBass.class);
+ assert classes.containsKey(Sole.class);
+
+ assert classes.get(Hound.class) instanceof EnterpriseBean;
+ assert classes.get(Elephant.class) instanceof EnterpriseBean;
+ assert classes.get(Panther.class) instanceof EnterpriseBean;
+ assert classes.get(Tiger.class) instanceof EnterpriseBean;
+ assert classes.get(Tuna.class) instanceof SimpleBean;
+ assert classes.get(Salmon.class) instanceof SimpleBean;
+ assert classes.get(SeaBass.class) instanceof SimpleBean;
+ assert classes.get(Sole.class) instanceof SimpleBean;
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/BootstrapTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Elephant.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Elephant.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Elephant.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,24 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Production;
+
+@Production
+@Stateful
+class Elephant implements ElephantLocal
+{
+
+ @Remove
+ public void remove1()
+ {
+
+ }
+
+ @Remove
+ public void remove2()
+ {
+
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Elephant.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ElephantLocal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ElephantLocal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ElephantLocal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import javax.ejb.Local;
+
+@Local
+public interface ElephantLocal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ElephantLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Hound.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Hound.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Hound.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import javax.annotation.Named;
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+@Stateful
+@Tame
+@Named("Pongo")
+class Hound implements HoundLocal
+{
+ @Remove
+ public void bye() {
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Hound.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/HoundLocal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/HoundLocal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/HoundLocal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import javax.ejb.Local;
+
+@Local
+public interface HoundLocal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/HoundLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Panther.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Panther.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Panther.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Production;
+
+@Production
+@Stateful
+class Panther implements PantherLocal
+{
+
+ @Remove
+ public void remove(String foo)
+ {
+
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Panther.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/PantherLocal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/PantherLocal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/PantherLocal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+public interface PantherLocal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/PantherLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Salmon.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Salmon.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Salmon.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import javax.annotation.Named;
+import javax.inject.Production;
+
+@Production
+@Named
+class Salmon implements ScottishFish
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Salmon.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ScottishFish.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ScottishFish.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ScottishFish.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+interface ScottishFish extends Animal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/ScottishFish.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/SeaBass.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/SeaBass.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/SeaBass.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import javax.context.RequestScoped;
+import javax.inject.Production;
+
+@Production
+@RequestScoped
+class SeaBass implements Animal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/SeaBass.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Sole.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Sole.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Sole.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import javax.annotation.Named;
+import javax.inject.Production;
+
+@Production
+@Whitefish
+@Named("whitefish")
+class Sole implements ScottishFish
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Sole.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Synchronous.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Synchronous.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Synchronous.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Synchronous
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Synchronous.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tame.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tame.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tame.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Tame
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tame.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tiger.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tiger.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tiger.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.inject.Production;
+
+@Production
+@Stateful
+@Synchronous
+public class Tiger implements TigerLocal
+{
+
+ @Remove
+ public void remove()
+ {
+
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tiger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/TigerLocal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/TigerLocal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/TigerLocal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import javax.ejb.Local;
+
+@Local
+public interface TigerLocal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/TigerLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tuna.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tuna.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tuna.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import javax.context.RequestScoped;
+
+@RequestScoped
+class Tuna
+{
+
+ public String getName()
+ {
+ return "Ophir";
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Tuna.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Whitefish.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Whitefish.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Whitefish.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface Whitefish
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleEnterpriseAndSimple/Whitefish.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Animal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Animal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Animal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleSimple;
+
+interface Animal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/BootstrapTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/BootstrapTest.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/BootstrapTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,42 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleSimple;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.inject.manager.Bean;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.bean.SimpleBean;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class BootstrapTest extends AbstractWebBeansTest
+{
+
+ @Test(groups="bootstrap")
+ public void testMultipleSimpleBean()
+ {
+ List<Bean<?>> beans = manager.getBeans();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof RIBean)
+ {
+ classes.put(((RIBean<?>) bean).getType(), bean);
+ }
+ }
+ assert classes.containsKey(Tuna.class);
+ assert classes.containsKey(Salmon.class);
+ assert classes.containsKey(SeaBass.class);
+ assert classes.containsKey(Sole.class);
+
+ assert classes.get(Tuna.class) instanceof SimpleBean;
+ assert classes.get(Salmon.class) instanceof SimpleBean;
+ assert classes.get(SeaBass.class) instanceof SimpleBean;
+ assert classes.get(Sole.class) instanceof SimpleBean;
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/BootstrapTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Salmon.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Salmon.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Salmon.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleSimple;
+
+import javax.annotation.Named;
+import javax.inject.Production;
+
+@Production
+@Named
+class Salmon implements ScottishFish
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Salmon.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/ScottishFish.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/ScottishFish.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/ScottishFish.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleSimple;
+
+interface ScottishFish extends Animal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/ScottishFish.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/SeaBass.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/SeaBass.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/SeaBass.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleSimple;
+
+import javax.context.RequestScoped;
+import javax.inject.Production;
+
+@Production
+@RequestScoped
+class SeaBass implements Animal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/SeaBass.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Sole.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Sole.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Sole.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleSimple;
+
+import javax.annotation.Named;
+import javax.inject.Production;
+
+@Production
+@Whitefish
+@Named("whitefish")
+class Sole implements ScottishFish
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Sole.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Tuna.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Tuna.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Tuna.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleSimple;
+
+import javax.context.RequestScoped;
+
+@RequestScoped
+class Tuna
+{
+
+ public String getName()
+ {
+ return "Ophir";
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Tuna.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Whitefish.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Whitefish.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Whitefish.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.bootstrap.multipleSimple;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface Whitefish
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/multipleSimple/Whitefish.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/BootstrapTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/BootstrapTest.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/BootstrapTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,36 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleEnterprise;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.inject.manager.Bean;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)Packaging(PackagingType.EAR)
+public class BootstrapTest extends AbstractWebBeansTest
+{
+
+ @Test(groups="bootstrap")
+ public void testSingleEnterpriseBean()
+ {
+ List<Bean<?>> beans = manager.getBeans();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof RIBean)
+ {
+ classes.put(((RIBean<?>) bean).getType(), bean);
+ }
+ }
+ assert classes.containsKey(Hound.class);
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/BootstrapTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Hound.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Hound.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Hound.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleEnterprise;
+
+import javax.annotation.Named;
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+@Stateful
+@Tame
+@Named("Pongo")
+class Hound implements HoundLocal
+{
+ @Remove
+ public void bye() {
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Hound.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/HoundLocal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/HoundLocal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/HoundLocal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleEnterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface HoundLocal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/HoundLocal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Tame.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Tame.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Tame.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleEnterprise;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Tame
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleEnterprise/Tame.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Animal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Animal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Animal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleProducerMethod;
+
+interface Animal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/BootstrapTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/BootstrapTest.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/BootstrapTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,43 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleProducerMethod;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.inject.manager.Bean;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.webbeans.bean.ProducerMethodBean;
+import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.bean.SimpleBean;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)Packaging(PackagingType.EAR)
+public class BootstrapTest extends AbstractWebBeansTest
+{
+
+ @Test(groups="bootstrap")
+ public void testProducerMethodBean()
+ {
+ //deployBeans(TarantulaProducer.class);
+ List<Bean<?>> beans = manager.getBeans();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof RIBean)
+ {
+ classes.put(((RIBean<?>) bean).getType(), bean);
+ }
+ }
+ assert classes.containsKey(TarantulaProducer.class);
+ assert classes.containsKey(Tarantula.class);
+
+ assert classes.get(TarantulaProducer.class) instanceof SimpleBean;
+ assert classes.get(Tarantula.class) instanceof ProducerMethodBean;
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/BootstrapTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlyAnimal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlyAnimal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlyAnimal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleProducerMethod;
+
+interface DeadlyAnimal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlyAnimal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlySpider.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlySpider.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlySpider.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleProducerMethod;
+
+interface DeadlySpider extends DeadlyAnimal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DeadlySpider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DefangedTarantula.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DefangedTarantula.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DefangedTarantula.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleProducerMethod;
+
+class DefangedTarantula extends Tarantula
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/DefangedTarantula.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Spider.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Spider.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Spider.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleProducerMethod;
+
+class Spider implements Animal
+{
+
+ public final void layEggs()
+ {
+
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Spider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tame.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tame.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tame.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleProducerMethod;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Tame
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tame.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tarantula.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tarantula.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tarantula.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleProducerMethod;
+
+class Tarantula extends Spider implements DeadlySpider
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/Tarantula.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/TarantulaProducer.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/TarantulaProducer.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/TarantulaProducer.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,13 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleProducerMethod;
+
+import javax.inject.Produces;
+
+public class TarantulaProducer
+{
+
+ @Produces @Tame public Tarantula produceTameTarantula()
+ {
+ return new DefangedTarantula();
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleProducerMethod/TarantulaProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/BootstrapTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/BootstrapTest.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/BootstrapTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,33 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleSimple;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.inject.manager.Bean;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.bean.RIBean;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class BootstrapTest extends AbstractWebBeansTest
+{
+
+ @Test(groups="bootstrap")
+ public void testSingleSimpleBean()
+ {
+ List<Bean<?>> beans = manager.getBeans();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>,
Bean<?>>();
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof RIBean)
+ {
+ classes.put(((RIBean<?>) bean).getType(), bean);
+ }
+ }
+ assert classes.containsKey(Tuna.class);
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/BootstrapTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/Tuna.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/Tuna.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/Tuna.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.test.unit.bootstrap.singleSimple;
+
+import javax.context.RequestScoped;
+
+@RequestScoped
+class Tuna
+{
+
+ public String getName()
+ {
+ return "Ophir";
+ }
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/bootstrap/singleSimple/Tuna.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/context/ContextTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/context/ContextTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/context/ContextTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,9 +1,13 @@
package org.jboss.webbeans.test.unit.context;
-import org.jboss.webbeans.test.unit.AbstractTest;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.Test;
-public class ContextTest extends AbstractTest
+@Artifact
+@IntegrationTest
+public class ContextTest extends AbstractWebBeansTest
{
// WBRI-155
@Test(groups="stub")
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -5,10 +5,12 @@
import javax.context.RequestScoped;
import javax.context.SessionScoped;
+import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.metadata.MetaDataCache;
import org.testng.annotations.Test;
-public class PassivatingContextTest extends org.jboss.webbeans.test.unit.AbstractTest
+@Artifact
+public class PassivatingContextTest extends
org.jboss.webbeans.test.unit.AbstractWebBeansTest
{
/**
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -4,11 +4,13 @@
import javax.context.RequestScoped;
+import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.metadata.StereotypeModel;
-import org.jboss.webbeans.test.unit.AbstractTest;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.Test;
-public class StereotypesTest extends AbstractTest
+@Artifact
+public class StereotypesTest extends AbstractWebBeansTest
{
@Test
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Bad.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Bad.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Bad.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,16 +0,0 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-import javax.context.RequestScoped;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-
-
-@Stateful
-@RequestScoped
-public class Bad implements BadLocal
-{
- @Remove
- public void bye()
- {
- }
-}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/BadLocal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/BadLocal.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/BadLocal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-import javax.ejb.Local;
-import javax.ejb.Remove;
-
-@Local
-public interface BadLocal
-{
- @Remove
- public void bye();
-}
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -8,11 +8,14 @@
import javax.inject.DeploymentType;
import javax.inject.Production;
+import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.introspector.AnnotatedClass;
import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.Test;
-public class ClassAnnotatedItemTest
+@Artifact
+public class ClassAnnotatedItemTest extends AbstractWebBeansTest
{
@Test
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -2,10 +2,15 @@
import javassist.util.proxy.ProxyObject;
-import org.jboss.webbeans.test.unit.AbstractTest;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.Test;
-public class EnterpriseBeanProxyTest extends AbstractTest
+@Artifact
+(a)Packaging(PackagingType.EAR)
+public class EnterpriseBeanProxyTest extends AbstractWebBeansTest
{
/**
@@ -14,7 +19,6 @@
@Test
public void testNoInterfaceView() throws Exception
{
- deployBeans(Mouse.class);
new RunInDependentContext()
{
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -5,16 +5,21 @@
import javax.inject.New;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
import org.jboss.webbeans.bean.EnterpriseBean;
import org.jboss.webbeans.bean.NewEnterpriseBean;
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.literal.NewLiteral;
-import org.jboss.webbeans.test.unit.AbstractTest;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.jboss.webbeans.util.Proxies.TypeInfo;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-public class NewEnterpriseBeanTest extends AbstractTest
+@Artifact
+(a)Packaging(PackagingType.EAR)
+public class NewEnterpriseBeanTest extends AbstractWebBeansTest
{
private static final New NEW_LITERAL = new NewLiteral();
@@ -24,7 +29,6 @@
@BeforeMethod
public void initNewBean() {
- deployBeans(WrappedEnterpriseBean.class);
assert manager.resolveByType(WrappedEnterpriseBean.class).size() == 1;
assert manager.resolveByType(WrappedEnterpriseBean.class).iterator().next()
instanceof EnterpriseBean;
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -4,15 +4,17 @@
import javax.inject.New;
+import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.bean.NewSimpleBean;
import org.jboss.webbeans.bean.SimpleBean;
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.literal.NewLiteral;
-import org.jboss.webbeans.test.unit.AbstractTest;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-public class NewSimpleBeanTest extends AbstractTest
+@Artifact
+public class NewSimpleBeanTest extends AbstractWebBeansTest
{
private SimpleBean<WrappedSimpleBean> wrappedSimpleBean;
private NewSimpleBean<WrappedSimpleBean> newSimpleBean;
@@ -21,7 +23,6 @@
@BeforeMethod
public void initNewBean() {
- deployBeans(WrappedSimpleBean.class);
assert manager.resolveByType(WrappedSimpleBean.class).size() == 1;
assert manager.resolveByType(WrappedSimpleBean.class).iterator().next() instanceof
SimpleBean;
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/RemoveMethodTests.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/RemoveMethodTests.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/RemoveMethodTests.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,33 +0,0 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-import org.jboss.webbeans.test.unit.AbstractTest;
-import org.testng.annotations.Test;
-
-public class RemoveMethodTests extends AbstractTest
-{
-
- /**
- * If the application directly calls an EJB remove method of an instance of a
- * session bean that is a stateful session bean and has scope @Dependent then
- * no parameters are passed to the method by the container.
- */
- @Test(groups = { "enterprisebean", "removemethod",
"lifecycle", "stub" })
- public void
testApplicationCalledRemoveMethodOfStatefulSessionBeanWithDependentScopeHasNoInjectedParameters()
- {
- deployBeans(Bad.class);
- BadLocal x = manager.getInstanceByType(BadLocal.class);
- x.bye();
- }
-
- /**
- * Furthermore, the container ignores the instance instead of destroying it
- * when Bean.destroy() is called, as defined in Section 6.5, �Lifecycle of
- * stateful session beans�.
- */
- @Test(groups = { "enterprisebean", "removemethod",
"lifecycle", "stub" })
- public void
testApplicationCalledRemoveMethodOfStatefulSessionBeanWithDependentScopeIsIgnoredWhenDestroyed()
- {
- assert false;
- }
-
-}
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/ExceptionHandlingTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/ExceptionHandlingTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/ExceptionHandlingTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,17 +1,19 @@
package org.jboss.webbeans.test.unit.implementation.exceptions;
+import javax.inject.AnnotationLiteral;
import javax.inject.CreationException;
-import org.jboss.webbeans.test.unit.AbstractTest;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.Test;
-public class ExceptionHandlingTest extends AbstractTest
+@Artifact
+public class ExceptionHandlingTest extends AbstractWebBeansTest
{
@Test(expectedExceptions=FooException.class)
public void testCreationExceptionWrapsRealExceptionForSimpleBean() throws Exception
{
- deployBeans(Lorry_Broken.class);
new RunInDependentContext()
{
@@ -38,7 +40,6 @@
@Test(expectedExceptions=FooException.class)
public void testCreationExceptionWrapsRealExceptionForProducerBean() throws Exception
{
- deployBeans(ShipProducer_Broken.class);
new RunInDependentContext()
{
@@ -47,7 +48,7 @@
{
try
{
- manager.getInstanceByType(Ship.class);
+ manager.getInstanceByType(Ship.class, new AnnotationLiteral<Large>()
{});
}
catch (Exception e)
{
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/Large.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/Large.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/Large.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.implementation.exceptions;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Large
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/Large.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/ShipProducer_Broken.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/ShipProducer_Broken.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/exceptions/ShipProducer_Broken.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -5,7 +5,7 @@
public class ShipProducer_Broken
{
- @Produces
+ @Produces @Large
public Ship produceShip() throws FooException
{
throw new FooException();
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/ProxyTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,15 +1,16 @@
package org.jboss.webbeans.test.unit.implementation.proxy;
-import org.jboss.webbeans.test.unit.AbstractTest;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.Test;
-public class ProxyTest extends AbstractTest
+@Artifact
+public class ProxyTest extends AbstractWebBeansTest
{
@Test(description="WBRI-122")
public void testImplementationClassImplementsSerializable()
{
- deployBeans(Foo.class);
manager.getInstanceByName("foo");
}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Animal.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Animal.java 2009-03-13
14:35:31 UTC (rev 1972)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Animal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-interface Animal
-{
-
-}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/AnotherDeploymentType.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/AnotherDeploymentType.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/AnotherDeploymentType.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.DeploymentType;
-
-@Target( { TYPE, METHOD })
-@Retention(RUNTIME)
-@Documented
-@DeploymentType
-@interface AnotherDeploymentType
-{
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Chunky.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Chunky.java 2009-03-13
14:35:31 UTC (rev 1972)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Chunky.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,24 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-@interface Chunky
-{
-
- boolean realChunky();
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Cod.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Cod.java 2009-03-13
14:35:31 UTC (rev 1972)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Cod.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import javax.annotation.Named;
-import javax.inject.Production;
-
-
-@Production
-@Whitefish
-@Chunky(realChunky=true)
-@Named("whitefish")
-class Cod implements ScottishFish
-{
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Expensive.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Expensive.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Expensive.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,28 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.annotation.NonBinding;
-import javax.inject.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-@interface Expensive
-{
-
- boolean veryExpensive();
-
- @NonBinding
- int cost();
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Farmer.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Farmer.java 2009-03-13
14:35:31 UTC (rev 1972)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Farmer.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import javax.inject.Production;
-
-@Production
-class Farmer<T>
-{
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/FishFarm.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/FishFarm.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/FishFarm.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,37 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import javax.inject.Current;
-import javax.inject.Production;
-
-@Production
-class FishFarm
-{
-
- @SuppressWarnings("unused")
- @Current
- public Tuna tuna;
-
- @SuppressWarnings("unused")
- @Current
- public Animal animal;
-
- @SuppressWarnings("unused")
- @Whitefish
- public ScottishFish whiteScottishFish;
-
- @SuppressWarnings("unused")
- @Whitefish
- public Animal whiteFish;
-
- @SuppressWarnings("unused")
- @Whitefish @Chunky(realChunky=true)
- public Animal realChunkyWhiteFish;
-
- @SuppressWarnings("unused")
- @Current
- public Farmer<ScottishFish> scottishFishFarmer;
-
- @Expensive(cost=60, veryExpensive=true) @Whitefish
- public Animal veryExpensiveWhitefish;
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Haddock.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Haddock.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Haddock.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import javax.annotation.Named;
-import javax.inject.Production;
-
-@Production
-@Named
-class Haddock implements Animal
-{
-
-}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,78 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import java.util.Set;
-
-import javax.inject.manager.Bean;
-
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.introspector.AnnotatedClass;
-import org.jboss.webbeans.introspector.AnnotatedField;
-import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
-import org.jboss.webbeans.introspector.jlr.AnnotatedFieldImpl;
-import org.jboss.webbeans.literal.CurrentLiteral;
-import org.jboss.webbeans.test.unit.AbstractTest;
-import org.testng.annotations.Test;
-
-public class ResolutionByTypeTest extends AbstractTest
-{
-
- private AnnotatedClass<FishFarm> fishFarmClass =
AnnotatedClassImpl.of(FishFarm.class);
-
- @Test(groups="resolution")
- public void testAnnotatedField() throws Exception
- {
- AnnotatedField<Tuna> tuna = new
AnnotatedFieldImpl<Tuna>(FishFarm.class.getDeclaredField("tuna"),
fishFarmClass);
- assert tuna.getType().isAssignableFrom(Tuna.class);
- assert tuna.getBindings().size() == 1;
- assert tuna.getBindings().contains(new CurrentLiteral());
- assert tuna.getType().isAssignableFrom(Tuna.class);
- }
-
- @Test
- public void testOneBinding() throws Exception
- {
- AnnotatedField<ScottishFish> whiteScottishFishField = new
AnnotatedFieldImpl<ScottishFish>(FishFarm.class.getDeclaredField("whiteScottishFish"),
fishFarmClass);
- Bean<Cod> codBean = SimpleBean.of(Cod.class, manager);
- Bean<Salmon> salmonBean = SimpleBean.of(Salmon.class, manager);
- Bean<Sole> soleBean = SimpleBean.of(Sole.class, manager);
- manager.addBean(codBean);
- manager.addBean(salmonBean);
- manager.addBean(soleBean);
- Set<Bean<ScottishFish>> possibleTargets =
manager.resolveByType(whiteScottishFishField);
- assert possibleTargets.size() == 2;
- assert possibleTargets.contains(codBean);
- assert possibleTargets.contains(soleBean);
- }
-
- @Test
- public void testABinding() throws Exception
- {
- AnnotatedField<Animal> whiteChunkyFishField = new
AnnotatedFieldImpl<Animal>(FishFarm.class.getDeclaredField("realChunkyWhiteFish"),
fishFarmClass);
-
- Bean<Cod> codBean = SimpleBean.of(Cod.class, manager);
- Bean<Salmon> salmonBean = SimpleBean.of(Salmon.class, manager);
- Bean<Sole> soleBean = SimpleBean.of(Sole.class, manager);
-
- manager.addBean(codBean);
- manager.addBean(salmonBean);
- manager.addBean(soleBean);
- Set<Bean<Animal>> possibleTargets =
manager.resolveByType(whiteChunkyFishField);
- assert possibleTargets.size() == 1;
- assert possibleTargets.contains(codBean);
- }
-
- @Test
- public void testMultipleApiTypeWithCurrent() throws Exception
- {
- AnnotatedField<Animal> animalField = new
AnnotatedFieldImpl<Animal>(FishFarm.class.getDeclaredField("animal"),
fishFarmClass);
- Bean<SeaBass> seaBassBean = SimpleBean.of(SeaBass.class, manager);
- Bean<Haddock> haddockBean = SimpleBean.of(Haddock.class, manager);
- manager.addBean(seaBassBean);
- manager.addBean(haddockBean);
- Set<Bean<Animal>> possibleTargets =
manager.resolveByType(animalField);
- assert possibleTargets.size() == 2;
- assert possibleTargets.contains(seaBassBean);
- assert possibleTargets.contains(haddockBean);
- }
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Salmon.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Salmon.java 2009-03-13
14:35:31 UTC (rev 1972)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Salmon.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import javax.annotation.Named;
-import javax.inject.Production;
-
-@Production
-@Named
-class Salmon implements ScottishFish
-{
-
-}
Deleted:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/ScottishFish.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/ScottishFish.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/ScottishFish.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-interface ScottishFish extends Animal
-{
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/SeaBass.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/SeaBass.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/SeaBass.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import javax.context.RequestScoped;
-import javax.inject.Production;
-
-@Production
-@RequestScoped
-class SeaBass implements Animal
-{
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Sole.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Sole.java 2009-03-13
14:35:31 UTC (rev 1972)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Sole.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import javax.annotation.Named;
-import javax.inject.Production;
-
-@Production
-@Whitefish
-@Named("whitefish")
-class Sole implements ScottishFish
-{
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Tuna.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Tuna.java 2009-03-13
14:35:31 UTC (rev 1972)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Tuna.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,15 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import javax.context.RequestScoped;
-
-@AnotherDeploymentType
-@RequestScoped
-class Tuna
-{
-
- public String getName()
- {
- return "Ophir";
- }
-
-}
Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Whitefish.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Whitefish.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/Whitefish.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,22 +0,0 @@
-package org.jboss.webbeans.test.unit.lookup;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-@interface Whitefish
-{
-
-}
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/CircularDependencyTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,16 +1,18 @@
package org.jboss.webbeans.test.unit.lookup.circular;
-import org.jboss.webbeans.test.unit.AbstractTest;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.Test;
-public class CircularDependencyTest extends AbstractTest
+@Artifact
+public class CircularDependencyTest extends AbstractWebBeansTest
{
@Test
public void testCircularInjectionOnTwoNormalBeans() throws Exception
{
- deployBeans(Pig.class, Food.class);
+ //deployBeans(Pig.class, Food.class);
manager.getInstanceByType(Pig.class).getName();
assert Pig.success;
assert Food.success;
@@ -19,7 +21,7 @@
@Test(timeOut=1000)
public void testCircularInjectionOnOneNormalAndOneDependentBean() throws Exception
{
- deployBeans(Car.class, Petrol.class);
+ //deployBeans(Car.class, Petrol.class);
new RunInDependentContext()
{
@@ -38,7 +40,7 @@
@Test(timeOut=1000)
public void testCircularInjectionOnOneDependentAndOneNormalBean() throws Exception
{
- deployBeans(Car.class, Petrol.class);
+ //deployBeans(Car.class, Petrol.class);
new RunInDependentContext()
{
@@ -58,7 +60,7 @@
@Test(timeOut=1000)
public void testCircularInjectionOnTwoSimpleDependentBeans() throws Exception
{
- deployBeans(Foo.class, Bar.class);
+ //deployBeans(Foo.class, Bar.class);
new RunInDependentContext()
{
@@ -76,7 +78,7 @@
@Test(timeOut=1000)
public void
testDependentProducerMethodDeclaredOnDependentBeanWhichInjectsProducedBean() throws
Exception
{
- deployBeans(DependentSelfConsumingDependentProducer.class);
+ //deployBeans(DependentSelfConsumingDependentProducer.class);
new RunInDependentContext()
{
@@ -92,7 +94,7 @@
@Test(timeOut=1000)
public void testNormalProducerMethodDeclaredOnNormalBeanWhichInjectsProducedBean()
throws Exception
{
- deployBeans(NormalSelfConsumingNormalProducer.class);
+ //deployBeans(NormalSelfConsumingNormalProducer.class);
new RunInDependentContext()
{
@@ -108,7 +110,7 @@
@Test(timeOut=1000)
public void testNormalProducerMethodDeclaredOnDependentBeanWhichInjectsProducedBean()
throws Exception
{
- deployBeans(DependentSelfConsumingNormalProducer.class);
+ //deployBeans(DependentSelfConsumingNormalProducer.class);
new RunInDependentContext()
{
@@ -124,7 +126,7 @@
@Test(timeOut=1000)
public void testDependentProducerMethodDeclaredOnNormalBeanWhichInjectsProducedBean()
throws Exception
{
- deployBeans(NormalSelfConsumingDependentProducer.class);
+ //deployBeans(NormalSelfConsumingDependentProducer.class);
new RunInDependentContext()
{
@@ -140,7 +142,7 @@
@Test(timeOut=1000)
public void testNormalSelfConsumingProducer() throws Exception
{
- deployBeans(NormalLoopingProducer.class);
+ //deployBeans(NormalLoopingProducer.class);
new RunInDependentContext()
{
@@ -156,7 +158,7 @@
@Test(groups="broken", timeOut=1000)
public void testDependentSelfConsumingProducer() throws Exception
{
- deployBeans(DependentLoopingProducer.class);
+ //deployBeans(DependentLoopingProducer.class);
new RunInDependentContext()
{
@@ -172,7 +174,7 @@
@Test(groups="broken", timeOut=1000)
public void testDependentCircularConstructors() throws Exception
{
- deployBeans(Water.class, Fish.class);
+ //deployBeans(Water.class, Fish.class);
new RunInDependentContext()
{
@@ -188,7 +190,7 @@
@Test(timeOut=1000)
public void testNormalCircularConstructors() throws Exception
{
- deployBeans(Bird.class, Air.class);
+ //deployBeans(Bird.class, Air.class);
new RunInDependentContext()
{
@@ -204,7 +206,7 @@
@Test(timeOut=1000)
public void testNormalAndDependentCircularConstructors() throws Exception
{
- deployBeans(Space.class, Planet.class);
+ //deployBeans(Space.class, Planet.class);
new RunInDependentContext()
{
@@ -220,7 +222,7 @@
@Test(groups="broken", timeOut=1000)
public void testSelfConsumingConstructorsOnDependentBean() throws Exception
{
- deployBeans(Farm.class);
+ //deployBeans(Farm.class);
new RunInDependentContext()
{
@@ -236,7 +238,7 @@
@Test(timeOut=1000)
public void testSelfConsumingConstructorsOnNormalBean() throws Exception
{
- deployBeans(House.class);
+ //deployBeans(House.class);
new RunInDependentContext()
{
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLooping.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLooping.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLooping.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface DependentLooping
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLooping.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentLoopingProducer.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -5,8 +5,8 @@
class DependentLoopingProducer
{
- @Produces
- public Violation produceViolation(Violation violation) {
+ @Produces @DependentLooping
+ public Violation produceViolation(@DependentLooping Violation violation) {
return new Violation();
}
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingDependentProducer.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,13 +1,12 @@
package org.jboss.webbeans.test.unit.lookup.circular;
-import javax.inject.Current;
import javax.inject.Produces;
class DependentSelfConsumingDependentProducer
{
- @Current Violation violation;
+ @SelfConsumingDependent Violation violation;
- @Produces
+ @Produces @SelfConsumingDependent
public Violation produceViolation() {
return new Violation();
}
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingNormalProducer.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingNormalProducer.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/DependentSelfConsumingNormalProducer.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,15 +1,13 @@
package org.jboss.webbeans.test.unit.lookup.circular;
import javax.context.ApplicationScoped;
-import javax.inject.Current;
import javax.inject.Produces;
-@ApplicationScoped
class DependentSelfConsumingNormalProducer
{
- @Current Violation violation;
+ @SelfConsumingNormal1 Violation violation;
- @Produces @ApplicationScoped
+ @Produces @ApplicationScoped @SelfConsumingNormal1
public Violation produceViolation() {
return new Violation();
}
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLooping.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLooping.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLooping.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface NormalLooping
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLooping.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalLoopingProducer.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -7,8 +7,8 @@
class NormalLoopingProducer
{
- @Produces @ApplicationScoped
- public Violation produceViolation(Violation violation) {
+ @Produces @ApplicationScoped @NormalLooping
+ public Violation produceViolation(@NormalLooping Violation violation) {
return new Violation();
}
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingDependentProducer.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingDependentProducer.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingDependentProducer.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,15 +1,14 @@
package org.jboss.webbeans.test.unit.lookup.circular;
import javax.context.ApplicationScoped;
-import javax.inject.Current;
import javax.inject.Produces;
@ApplicationScoped
class NormalSelfConsumingDependentProducer
{
- @Current Violation violation;
+ @SelfConsumingDependent1 Violation violation;
- @Produces @ApplicationScoped
+ @Produces @SelfConsumingDependent1
public Violation produceViolation() {
return new Violation();
}
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingNormalProducer.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingNormalProducer.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/NormalSelfConsumingNormalProducer.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -1,15 +1,14 @@
package org.jboss.webbeans.test.unit.lookup.circular;
import javax.context.ApplicationScoped;
-import javax.inject.Current;
import javax.inject.Produces;
@ApplicationScoped
class NormalSelfConsumingNormalProducer
{
- @Current Violation violation;
+ @SelfConsumingNormal Violation violation;
- @Produces @ApplicationScoped
+ @Produces @ApplicationScoped @SelfConsumingNormal
public Violation produceViolation() {
return new Violation();
}
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingDependent.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingDependent.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingDependent.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface SelfConsumingDependent
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingDependent.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingDependent1.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingDependent1.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingDependent1.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface SelfConsumingDependent1
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingDependent1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingNormal.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingNormal.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingNormal.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface SelfConsumingNormal
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingNormal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingNormal1.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingNormal1.java
(rev 0)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingNormal1.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.unit.lookup.circular;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface SelfConsumingNormal1
+{
+
+}
Property changes on:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/lookup/circular/SelfConsumingNormal1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/BeansXmlParserTest.java
===================================================================
---
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/BeansXmlParserTest.java 2009-03-13
14:35:31 UTC (rev 1972)
+++
ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/xml/BeansXmlParserTest.java 2009-03-13
14:37:24 UTC (rev 1973)
@@ -7,13 +7,15 @@
import javax.inject.Production;
import javax.inject.Standard;
+import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.bootstrap.BeansXmlParser;
import org.jboss.webbeans.mock.MockResourceLoader;
import org.jboss.webbeans.resources.spi.ResourceLoader;
-import org.jboss.webbeans.test.unit.AbstractTest;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.Test;
-public class BeansXmlParserTest extends AbstractTest
+@Artifact
+public class BeansXmlParserTest extends AbstractWebBeansTest
{
private static final ResourceLoader RESOURCE_LOADER = new MockResourceLoader();
Added: ri/trunk/impl/src/test/resources/META-INF/web-beans-tck.properties
===================================================================
--- ri/trunk/impl/src/test/resources/META-INF/web-beans-tck.properties
(rev 0)
+++ ri/trunk/impl/src/test/resources/META-INF/web-beans-tck.properties 2009-03-13 14:37:24
UTC (rev 1973)
@@ -0,0 +1 @@
+org.jboss.testharness.spi.StandaloneContainers=org.jboss.webbeans.test.unit.StandaloneContainersImpl
\ No newline at end of file
Property changes on: ri/trunk/impl/src/test/resources/META-INF/web-beans-tck.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
ri/trunk/impl/src/test/resources/org/jboss/testharness/impl/packaging/ear/ejb-jar.xml
===================================================================
--- ri/trunk/impl/src/test/resources/org/jboss/testharness/impl/packaging/ear/ejb-jar.xml
(rev 0)
+++
ri/trunk/impl/src/test/resources/org/jboss/testharness/impl/packaging/ear/ejb-jar.xml 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+ version="3.0">
+
+</ejb-jar>
Property changes on:
ri/trunk/impl/src/test/resources/org/jboss/testharness/impl/packaging/ear/ejb-jar.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/impl/src/test/resources/org/jboss/webbeans/test/examples/beans.xml
===================================================================
--- ri/trunk/impl/src/test/resources/org/jboss/webbeans/test/examples/beans.xml
(rev 0)
+++ ri/trunk/impl/src/test/resources/org/jboss/webbeans/test/examples/beans.xml 2009-03-13
14:37:24 UTC (rev 1973)
@@ -0,0 +1,8 @@
+<Beans xmlns="urn:java:ee"
+ xmlns:test="urn:java:org.jboss.webbeans.test.examples">
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:Mock />
+ </Deploy>
+</Beans>
Property changes on:
ri/trunk/impl/src/test/resources/org/jboss/webbeans/test/examples/beans.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain