[webbeans-commits] Webbeans SVN: r1052 - in ri/trunk: webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap and 5 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-17 18:57:33 -0500 (Sat, 17 Jan 2009)
New Revision: 1052
Added:
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNamingContext.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/NamingContext.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/AbstractNamingContext.java
Removed:
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNaming.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/Naming.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/AbstractNaming.java
Modified:
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbResolver.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbResolver.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/DefaultNaming.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletBootstrap.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java
Log:
rename naming->namingcontext
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-01-17 23:53:16 UTC (rev 1051)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -60,7 +60,7 @@
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
-import org.jboss.webbeans.resources.spi.Naming;
+import org.jboss.webbeans.resources.spi.NamingContext;
import org.jboss.webbeans.resources.spi.ResourceLoader;
import org.jboss.webbeans.util.BeanValidation;
import org.jboss.webbeans.util.Proxies;
@@ -116,17 +116,17 @@
private transient final ResourceLoader resourceLoader;
// The Naming (JNDI) access
- private transient final Naming naming;
+ private transient final NamingContext namingContext;
/**
* Create a new manager
*
* @param ejbResolver the ejbResolver to use
*/
- public ManagerImpl(Naming naming, EjbResolver ejbResolver, ResourceLoader resourceLoader)
+ public ManagerImpl(NamingContext namingContext, EjbResolver ejbResolver, ResourceLoader resourceLoader)
{
this.ejbResolver = ejbResolver;
- this.naming = naming;
+ this.namingContext = namingContext;
this.resourceLoader = resourceLoader;
this.beans = new CopyOnWriteArrayList<Bean<?>>();
this.beanMap = new ConcurrentHashMap<Class<?>, Bean<?>>();
@@ -732,9 +732,9 @@
return this;
}
- public Naming getNaming()
+ public NamingContext getNaming()
{
- return naming;
+ return namingContext;
}
public EjbResolver getEjbResolver()
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-01-17 23:53:16 UTC (rev 1051)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -63,7 +63,7 @@
import org.jboss.webbeans.jsf.JSFApiAbstraction;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
-import org.jboss.webbeans.resources.spi.Naming;
+import org.jboss.webbeans.resources.spi.NamingContext;
import org.jboss.webbeans.resources.spi.ResourceLoader;
import org.jboss.webbeans.servlet.ServletApiAbstraction;
import org.jboss.webbeans.transaction.Transaction;
@@ -118,9 +118,9 @@
// The Web Beans manager
private ManagerImpl manager;
- protected void initManager(Naming naming, EjbResolver ejbResolver, ResourceLoader resourceLoader)
+ protected void initManager(NamingContext namingContext, EjbResolver ejbResolver, ResourceLoader resourceLoader)
{
- this.manager = new ManagerImpl(naming, ejbResolver, resourceLoader);
+ this.manager = new ManagerImpl(namingContext, ejbResolver, resourceLoader);
manager.getNaming().bind(ManagerImpl.JNDI_KEY, getManager());
CurrentManager.setRootManager(manager);
}
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/AbstractNaming.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/AbstractNaming.java 2009-01-17 23:53:16 UTC (rev 1051)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/AbstractNaming.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -1,79 +0,0 @@
-package org.jboss.webbeans.resource;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.webbeans.ExecutionException;
-
-import org.jboss.webbeans.resources.spi.Naming;
-
-public abstract class AbstractNaming implements Naming
-{
-
- public abstract Context getContext();
-
- /**
- * Binds in item to JNDI
- *
- * @param key The key to bind under
- * @param value The value to bind
- */
- public void bind(String key, Object value)
- {
- try
- {
- List<String> parts = splitIntoContexts(key);
- Context context = getContext();
- for (int i = 0; i < parts.size() - 1; i++)
- {
- context = (Context) context.lookup(parts.get(i));
- }
- context.bind(parts.get(parts.size() - 1), value);
- }
- catch (NamingException e)
- {
- throw new ExecutionException("Cannot bind " + value + " to " + key, e);
- }
- }
-
- /**
- * Lookup an item from JNDI
- *
- * @param name The key
- * @param expectedType The expected return type
- * @return The found item
- */
- public <T> T lookup(String name, Class<? extends T> expectedType)
- {
- Object instance;
- try
- {
- instance = getContext().lookup(name);
- }
- catch (NamingException e)
- {
- throw new ExecutionException("Cannot lookup " + name, e);
- }
- try
- {
- return expectedType.cast(instance);
- }
- catch (ClassCastException e)
- {
- throw new ExecutionException(instance + " not of expected type " + expectedType, e);
- }
- }
-
- private static List<String> splitIntoContexts(String key)
- {
- List<String> parts = new ArrayList<String>();
- for (String part : key.split("/"))
- {
- parts.add(part);
- }
- return parts;
- }
-
-}
\ No newline at end of file
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/AbstractNamingContext.java (from rev 1049, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/AbstractNaming.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/AbstractNamingContext.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/AbstractNamingContext.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -0,0 +1,79 @@
+package org.jboss.webbeans.resource;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.webbeans.ExecutionException;
+
+import org.jboss.webbeans.resources.spi.NamingContext;
+
+public abstract class AbstractNamingContext implements NamingContext
+{
+
+ public abstract Context getContext();
+
+ /**
+ * Binds in item to JNDI
+ *
+ * @param key The key to bind under
+ * @param value The value to bind
+ */
+ public void bind(String key, Object value)
+ {
+ try
+ {
+ List<String> parts = splitIntoContexts(key);
+ Context context = getContext();
+ for (int i = 0; i < parts.size() - 1; i++)
+ {
+ context = (Context) context.lookup(parts.get(i));
+ }
+ context.bind(parts.get(parts.size() - 1), value);
+ }
+ catch (NamingException e)
+ {
+ throw new ExecutionException("Cannot bind " + value + " to " + key, e);
+ }
+ }
+
+ /**
+ * Lookup an item from JNDI
+ *
+ * @param name The key
+ * @param expectedType The expected return type
+ * @return The found item
+ */
+ public <T> T lookup(String name, Class<? extends T> expectedType)
+ {
+ Object instance;
+ try
+ {
+ instance = getContext().lookup(name);
+ }
+ catch (NamingException e)
+ {
+ throw new ExecutionException("Cannot lookup " + name, e);
+ }
+ try
+ {
+ return expectedType.cast(instance);
+ }
+ catch (ClassCastException e)
+ {
+ throw new ExecutionException(instance + " not of expected type " + expectedType, e);
+ }
+ }
+
+ private static List<String> splitIntoContexts(String key)
+ {
+ List<String> parts = new ArrayList<String>();
+ for (String part : key.split("/"))
+ {
+ parts.add(part);
+ }
+ return parts;
+ }
+
+}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/AbstractNamingContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/DefaultNaming.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/DefaultNaming.java 2009-01-17 23:53:16 UTC (rev 1051)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resource/DefaultNaming.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -26,7 +26,7 @@
*
* @author Pete Muir
*/
-public class DefaultNaming extends AbstractNaming
+public class DefaultNaming extends AbstractNamingContext
{
private static final long serialVersionUID = 1L;
// The initial lookup context
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletBootstrap.java 2009-01-17 23:53:16 UTC (rev 1051)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletBootstrap.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -31,7 +31,7 @@
import org.jboss.webbeans.context.SessionContext;
import org.jboss.webbeans.ejb.spi.EjbResolver;
import org.jboss.webbeans.resource.DefaultNaming;
-import org.jboss.webbeans.resources.spi.Naming;
+import org.jboss.webbeans.resources.spi.NamingContext;
import org.jboss.webbeans.resources.spi.ResourceLoader;
import org.jboss.webbeans.util.DeploymentProperties;
@@ -81,9 +81,9 @@
initManager(createNaming(servletContext), createEjbResolver(servletContext), getResourceLoader());
}
- protected Naming createNaming(ServletContext servletContext)
+ protected NamingContext createNaming(ServletContext servletContext)
{
- Constructor<? extends Naming> namingConstructor = getClassConstructor(getDeploymentProperties(), getResourceLoader(), Naming.PROPERTY_NAME, Naming.class, ServletContext.class);
+ Constructor<? extends NamingContext> namingConstructor = getClassConstructor(getDeploymentProperties(), getResourceLoader(), NamingContext.PROPERTY_NAME, NamingContext.class, ServletContext.class);
if (namingConstructor != null)
{
return newInstance(namingConstructor, servletContext);
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java 2009-01-17 23:53:16 UTC (rev 1051)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -19,8 +19,8 @@
import org.jboss.webbeans.bootstrap.spi.EjbDiscovery;
import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
import org.jboss.webbeans.ejb.spi.EjbResolver;
-import org.jboss.webbeans.resource.AbstractNaming;
-import org.jboss.webbeans.resources.spi.Naming;
+import org.jboss.webbeans.resource.AbstractNamingContext;
+import org.jboss.webbeans.resources.spi.NamingContext;
import org.jboss.webbeans.resources.spi.ResourceLoader;
import org.jboss.webbeans.test.mock.context.MockApplicationContext;
import org.jboss.webbeans.test.mock.context.MockDependentContext;
@@ -30,7 +30,7 @@
public class MockBootstrap extends WebBeansBootstrap
{
- public static class MockNaming extends AbstractNaming
+ public static class MockNaming extends AbstractNamingContext
{
private Context context;
@@ -133,13 +133,13 @@
return PersistenceContext.class;
}
- public Object resolveEjb(InjectionPoint injectionPoint, Naming naming)
+ public Object resolveEjb(InjectionPoint injectionPoint, NamingContext namingContext)
{
// TODO Implement EJB resolution for Unit tests
return null;
}
- public Object resolvePersistenceContext(InjectionPoint injectionPoint, Naming naming)
+ public Object resolvePersistenceContext(InjectionPoint injectionPoint, NamingContext namingContext)
{
// TODO Implement PU resolution for Unit tests
return null;
@@ -150,7 +150,7 @@
return Resource.class;
}
- public Object resolveResource(InjectionPoint injectionPoint, Naming naming)
+ public Object resolveResource(InjectionPoint injectionPoint, NamingContext namingContext)
{
// TODO Auto-generated method stub
return null;
Modified: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbResolver.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbResolver.java 2009-01-17 23:53:16 UTC (rev 1051)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/EjbResolver.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -4,7 +4,7 @@
import javax.webbeans.InjectionPoint;
-import org.jboss.webbeans.resources.spi.Naming;
+import org.jboss.webbeans.resources.spi.NamingContext;
/**
* A container should implement this interface to allow the Web Beans RI to
@@ -30,13 +30,13 @@
* @throws IllegalStateException
* if no EJBs can be resolved for injection
*/
- public Object resolveEjb(InjectionPoint injectionPoint, Naming naming);
+ public Object resolveEjb(InjectionPoint injectionPoint, NamingContext namingContext);
/**
* Resolve the value for the given @PersistenceContext injection point
*
* @param injectionPoint the injection point metadata
- * @param naming the pluggable Web Beans JNDI lookup facility
+ * @param namingContext the pluggable Web Beans JNDI lookup facility
* @return an instance of the persistence unit
* @throws IllegalArgumentException
* if the injection point is not annotated with
@@ -45,13 +45,13 @@
* @throws IllegalStateException
* if no suitable persistence units can be resolved for injection
*/
- public Object resolvePersistenceContext(InjectionPoint injectionPoint, Naming naming);
+ public Object resolvePersistenceContext(InjectionPoint injectionPoint, NamingContext namingContext);
/**
* Resolve the value for the given @Resource injection point
*
* @param injectionPoint the injection point metadata
- * @param naming the pluggable Web Beans JNDI lookup facility
+ * @param namingContext the pluggable Web Beans JNDI lookup facility
* @return an instance of the resource
* @throws IllegalArgumentException
* if the injection point is not annotated with @Resource, or, if
@@ -60,7 +60,7 @@
* @throws IllegalStateException
* if no resource can be resolved for injection
*/
- public Object resolveResource(InjectionPoint injectionPoint, Naming naming);
+ public Object resolveResource(InjectionPoint injectionPoint, NamingContext namingContext);
/**
* Get the annotation which defines an @EJB injection point
Modified: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbResolver.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbResolver.java 2009-01-17 23:53:16 UTC (rev 1051)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbResolver.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -4,7 +4,7 @@
import javax.webbeans.InjectionPoint;
-import org.jboss.webbeans.resources.spi.Naming;
+import org.jboss.webbeans.resources.spi.NamingContext;
/**
* An implementation of {@link EjbResolver} which forwards all its method calls
@@ -36,19 +36,19 @@
return delegate().getResourceAnnotation();
}
- public Object resolveEjb(InjectionPoint injectionPoint, Naming naming)
+ public Object resolveEjb(InjectionPoint injectionPoint, NamingContext namingContext)
{
- return delegate().resolveEjb(injectionPoint, naming);
+ return delegate().resolveEjb(injectionPoint, namingContext);
}
- public Object resolvePersistenceContext(InjectionPoint injectionPoint, Naming naming)
+ public Object resolvePersistenceContext(InjectionPoint injectionPoint, NamingContext namingContext)
{
- return delegate().resolvePersistenceContext(injectionPoint, naming);
+ return delegate().resolvePersistenceContext(injectionPoint, namingContext);
}
- public Object resolveResource(InjectionPoint injectionPoint, Naming naming)
+ public Object resolveResource(InjectionPoint injectionPoint, NamingContext namingContext)
{
- return delegate().resolveResource(injectionPoint, naming);
+ return delegate().resolveResource(injectionPoint, namingContext);
}
@Override
Deleted: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNaming.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNaming.java 2009-01-17 23:53:16 UTC (rev 1051)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNaming.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -1,47 +0,0 @@
-package org.jboss.webbeans.resources.spi;
-
-
-/**
- * An implementation of {@link Naming} which forwards all its method calls
- * to another {@link Naming}}. Subclasses should override one or more
- * methods to modify the behavior of the backing {@link Naming} as desired
- * per the <a
- * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
- *
- * @author Pete Muir
- *
- */
-public abstract class ForwardingNaming implements Naming
-{
-
- protected abstract Naming delegate();
-
- public void bind(String key, Object value)
- {
- delegate().bind(key, value);
- }
-
- public <T> T lookup(String name, Class<? extends T> expectedType)
- {
- return delegate().lookup(name, expectedType);
- }
-
- @Override
- public boolean equals(Object obj)
- {
- return delegate().equals(obj);
- }
-
- @Override
- public String toString()
- {
- return delegate().toString();
- }
-
- @Override
- public int hashCode()
- {
- return delegate().hashCode();
- }
-
-}
Copied: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNamingContext.java (from rev 1051, ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNaming.java)
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNamingContext.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNamingContext.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -0,0 +1,47 @@
+package org.jboss.webbeans.resources.spi;
+
+
+/**
+ * An implementation of {@link NamingContext} which forwards all its method calls
+ * to another {@link NamingContext}}. Subclasses should override one or more
+ * methods to modify the behavior of the backing {@link NamingContext} as desired
+ * per the <a
+ * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
+ *
+ * @author Pete Muir
+ *
+ */
+public abstract class ForwardingNamingContext implements NamingContext
+{
+
+ protected abstract NamingContext delegate();
+
+ public void bind(String key, Object value)
+ {
+ delegate().bind(key, value);
+ }
+
+ public <T> T lookup(String name, Class<? extends T> expectedType)
+ {
+ return delegate().lookup(name, expectedType);
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ return delegate().equals(obj);
+ }
+
+ @Override
+ public String toString()
+ {
+ return delegate().toString();
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return delegate().hashCode();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNamingContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/Naming.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/Naming.java 2009-01-17 23:53:16 UTC (rev 1051)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/Naming.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.webbeans.resources.spi;
-
-public interface Naming
-{
-
- public static final String PROPERTY_NAME = Naming.class.getName();
-
- /**
- * Typed JNDI lookup
- *
- * @param <T> The type
- * @param name The JNDI name
- * @param expectedType The expected type
- * @return The object
- */
- public <T> T lookup(String name, Class<? extends T> expectedType);
-
- /**
- * Binds an item to JNDI
- *
- * @param key The key to bind under
- * @param value The item to bind
- */
- public void bind(String key, Object value);
-
-}
Copied: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/NamingContext.java (from rev 1049, ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/Naming.java)
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/NamingContext.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/NamingContext.java 2009-01-17 23:57:33 UTC (rev 1052)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.resources.spi;
+
+public interface NamingContext
+{
+
+ public static final String PROPERTY_NAME = NamingContext.class.getName();
+
+ /**
+ * Typed JNDI lookup
+ *
+ * @param <T> The type
+ * @param name The JNDI name
+ * @param expectedType The expected type
+ * @return The object
+ */
+ public <T> T lookup(String name, Class<? extends T> expectedType);
+
+ /**
+ * Binds an item to JNDI
+ *
+ * @param key The key to bind under
+ * @param value The item to bind
+ */
+ public void bind(String name, Object value);
+
+}
Property changes on: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/NamingContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 2 months
[webbeans-commits] Webbeans SVN: r1051 - in ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans: ejb/spi and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-17 18:53:16 -0500 (Sat, 17 Jan 2009)
New Revision: 1051
Added:
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/ForwardingWebBeanDiscovery.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwadingBusinessInterfaceDescriptor.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbDescriptor.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNaming.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingResourceLoader.java
Modified:
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/ForwardingEjbDiscovery.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbResolver.java
Log:
support decorator pattern
Modified: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/ForwardingEjbDiscovery.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/ForwardingEjbDiscovery.java 2009-01-17 20:20:08 UTC (rev 1050)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/ForwardingEjbDiscovery.java 2009-01-17 23:53:16 UTC (rev 1051)
@@ -2,6 +2,16 @@
import org.jboss.webbeans.ejb.spi.EjbDescriptor;
+/**
+ * An implementation of {@link EjbDiscovery} which forwards all its method calls
+ * to another {@link EjbDiscovery}}. Subclasses should override one or more
+ * methods to modify the behavior of the backing {@link EjbDiscovery} as desired
+ * per the <a
+ * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
+ *
+ * @author Pete Muir
+ *
+ */
public abstract class ForwardingEjbDiscovery implements EjbDiscovery
{
@@ -12,4 +22,22 @@
return delegate().discoverEjbs();
}
+ @Override
+ public boolean equals(Object obj)
+ {
+ return delegate().equals(obj);
+ }
+
+ @Override
+ public String toString()
+ {
+ return delegate().toString();
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return delegate().hashCode();
+ }
+
}
Added: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/ForwardingWebBeanDiscovery.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/ForwardingWebBeanDiscovery.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/ForwardingWebBeanDiscovery.java 2009-01-17 23:53:16 UTC (rev 1051)
@@ -0,0 +1,48 @@
+package org.jboss.webbeans.bootstrap.spi;
+
+import java.net.URL;
+
+/**
+ * An implementation of {@link WebBeanDiscovery} which forwards all its method
+ * calls to another {@link WebBeanDiscovery}}. Subclasses should override one or
+ * more methods to modify the behavior of the backing {@link WebBeanDiscovery}
+ * as desired per the <a
+ * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
+ *
+ * @author Pete Muir
+ *
+ */
+public abstract class ForwardingWebBeanDiscovery implements WebBeanDiscovery
+{
+
+ protected abstract WebBeanDiscovery delegate();
+
+ public Iterable<Class<?>> discoverWebBeanClasses()
+ {
+ return delegate().discoverWebBeanClasses();
+ }
+
+ public Iterable<URL> discoverWebBeansXml()
+ {
+ return delegate().discoverWebBeansXml();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ return delegate().equals(obj);
+ }
+
+ @Override
+ public String toString()
+ {
+ return delegate().toString();
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return delegate().hashCode();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/ForwardingWebBeanDiscovery.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwadingBusinessInterfaceDescriptor.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwadingBusinessInterfaceDescriptor.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwadingBusinessInterfaceDescriptor.java 2009-01-17 23:53:16 UTC (rev 1051)
@@ -0,0 +1,47 @@
+package org.jboss.webbeans.ejb.spi;
+
+
+/**
+ * An implementation of {@link BusinessInterfaceDescriptor} which forwards all
+ * its method calls to another {@link BusinessInterfaceDescriptor}}. Subclasses
+ * should override one or more methods to modify the behavior of the backing
+ * {@link BusinessInterfaceDescriptor} as desired per the <a
+ * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
+ *
+ * @author Pete Muir
+ *
+ */
+public abstract class ForwadingBusinessInterfaceDescriptor<T> implements BusinessInterfaceDescriptor<T>
+{
+
+ protected abstract BusinessInterfaceDescriptor<T> delegate();
+
+ public Class<T> getInterface()
+ {
+ return delegate().getInterface();
+ }
+
+ public String getJndiName()
+ {
+ return delegate().getJndiName();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ return delegate().equals(obj);
+ }
+
+ @Override
+ public String toString()
+ {
+ return delegate().toString();
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return delegate().hashCode();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwadingBusinessInterfaceDescriptor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbDescriptor.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbDescriptor.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbDescriptor.java 2009-01-17 23:53:16 UTC (rev 1051)
@@ -0,0 +1,85 @@
+package org.jboss.webbeans.ejb.spi;
+
+import java.lang.reflect.Method;
+
+
+/**
+ * An implementation of {@link EjbDescriptor} which forwards all its method calls
+ * to another {@link EjbDescriptor}}. Subclasses should override one or more
+ * methods to modify the behavior of the backing {@link EjbDescriptor} as desired
+ * per the <a
+ * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
+ *
+ * @author Pete Muir
+ *
+ */
+public abstract class ForwardingEjbDescriptor<T> implements EjbDescriptor<T>
+{
+
+ protected abstract EjbDescriptor<T> delegate();
+
+
+ public String getEjbName()
+ {
+ return delegate().getEjbName();
+ }
+
+ public Iterable<BusinessInterfaceDescriptor<?>> getLocalBusinessInterfaces()
+ {
+ return delegate().getLocalBusinessInterfaces();
+ }
+
+ public Iterable<BusinessInterfaceDescriptor<?>> getRemoteBusinessInterfaces()
+ {
+ return delegate().getRemoteBusinessInterfaces();
+ }
+
+ public Iterable<Method> getRemoveMethods()
+ {
+ return delegate().getRemoveMethods();
+ }
+
+ public Class<T> getType()
+ {
+ return delegate().getType();
+ }
+
+ public boolean isMessageDriven()
+ {
+ return delegate().isMessageDriven();
+ }
+
+ public boolean isSingleton()
+ {
+ return delegate().isSingleton();
+ }
+
+ public boolean isStateful()
+ {
+ return delegate().isStateful();
+ }
+
+ public boolean isStateless()
+ {
+ return delegate().isStateless();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ return delegate().equals(obj);
+ }
+
+ @Override
+ public String toString()
+ {
+ return delegate().toString();
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return delegate().hashCode();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbDescriptor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbResolver.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbResolver.java 2009-01-17 20:20:08 UTC (rev 1050)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/ejb/spi/ForwardingEjbResolver.java 2009-01-17 23:53:16 UTC (rev 1051)
@@ -6,6 +6,16 @@
import org.jboss.webbeans.resources.spi.Naming;
+/**
+ * An implementation of {@link EjbResolver} which forwards all its method calls
+ * to another {@link EjbResolver}}. Subclasses should override one or more
+ * methods to modify the behavior of the backing {@link EjbResolver} as desired
+ * per the <a
+ * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
+ *
+ * @author Pete Muir
+ *
+ */
public abstract class ForwardingEjbResolver implements EjbResolver
{
@@ -41,4 +51,22 @@
return delegate().resolveResource(injectionPoint, naming);
}
+ @Override
+ public boolean equals(Object obj)
+ {
+ return delegate().equals(obj);
+ }
+
+ @Override
+ public String toString()
+ {
+ return delegate().toString();
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return delegate().hashCode();
+ }
+
}
Added: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNaming.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNaming.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNaming.java 2009-01-17 23:53:16 UTC (rev 1051)
@@ -0,0 +1,47 @@
+package org.jboss.webbeans.resources.spi;
+
+
+/**
+ * An implementation of {@link Naming} which forwards all its method calls
+ * to another {@link Naming}}. Subclasses should override one or more
+ * methods to modify the behavior of the backing {@link Naming} as desired
+ * per the <a
+ * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
+ *
+ * @author Pete Muir
+ *
+ */
+public abstract class ForwardingNaming implements Naming
+{
+
+ protected abstract Naming delegate();
+
+ public void bind(String key, Object value)
+ {
+ delegate().bind(key, value);
+ }
+
+ public <T> T lookup(String name, Class<? extends T> expectedType)
+ {
+ return delegate().lookup(name, expectedType);
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ return delegate().equals(obj);
+ }
+
+ @Override
+ public String toString()
+ {
+ return delegate().toString();
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return delegate().hashCode();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingNaming.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingResourceLoader.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingResourceLoader.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingResourceLoader.java 2009-01-17 23:53:16 UTC (rev 1051)
@@ -0,0 +1,53 @@
+package org.jboss.webbeans.resources.spi;
+
+import java.net.URL;
+
+/**
+ * An implementation of {@link ResourceLoader} which forwards all its method calls
+ * to another {@link ResourceLoader}}. Subclasses should override one or more
+ * methods to modify the behavior of the backing {@link ResourceLoader} as desired
+ * per the <a
+ * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
+ *
+ * @author Pete Muir
+ *
+ */
+public abstract class ForwardingResourceLoader implements ResourceLoader
+{
+
+ protected abstract ResourceLoader delegate();
+
+ public Class<?> classForName(String name)
+ {
+ return delegate().classForName(name);
+ }
+
+ public URL getResource(String name)
+ {
+ return delegate().getResource(name);
+ }
+
+ public Iterable<URL> getResources(String name)
+ {
+ return delegate().getResources(name);
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ return delegate().equals(obj);
+ }
+
+ @Override
+ public String toString()
+ {
+ return delegate().toString();
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return delegate().hashCode();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ForwardingResourceLoader.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 2 months
[webbeans-commits] Webbeans SVN: r1050 - in ri/trunk/webbeans-ri: src/test/java/org/jboss/webbeans and 4 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-17 15:20:08 -0500 (Sat, 17 Jan 2009)
New Revision: 1050
Added:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Game.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Generator.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Mock.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/MockSentenceTranslator.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Random.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceParser.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceTranslator.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Tests.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/TextTranslator.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Translator.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockApplicationContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockDependentContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockRequestContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockSessionContext.java
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Game.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Generator.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Mock.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/MockSentenceTranslator.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Random.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceParser.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceTranslator.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Tests.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/TextTranslator.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Translator.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockApplicationContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockDependentContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockInitialContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockRequestContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockSessionContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/newbean/
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java
ri/trunk/webbeans-ri/unit-tests.xml
Log:
a bit more cleanup and move stuff a bit
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples (from rev 1047, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples)
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Game.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Game.java 2009-01-17 19:58:42 UTC (rev 1047)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Game.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.examples;
-
-import javax.webbeans.Initializer;
-
-public class Game
-{
- private final int number;
-
- @Initializer
- Game(@Random int number)
- {
- this.number = number;
- }
-
- public int getNumber()
- {
- return number;
- }
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Game.java (from rev 1049, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Game.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Game.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Game.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.test.examples;
+
+import javax.webbeans.Initializer;
+
+public class Game
+{
+ private final int number;
+
+ @Initializer
+ Game(@Random int number)
+ {
+ this.number = number;
+ }
+
+ public int getNumber()
+ {
+ return number;
+ }
+
+}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Generator.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Generator.java 2009-01-17 19:58:42 UTC (rev 1047)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Generator.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.examples;
-
-import javax.webbeans.ApplicationScoped;
-import javax.webbeans.Produces;
-
-@ApplicationScoped
-public class Generator {
-
- private java.util.Random random = new java.util.Random( System.currentTimeMillis() );
-
- java.util.Random getRandom()
- {
- return random;
- }
-
- @Produces @Random int next() {
- return getRandom().nextInt(100);
- }
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Generator.java (from rev 1049, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Generator.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Generator.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Generator.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.test.examples;
+
+import javax.webbeans.ApplicationScoped;
+import javax.webbeans.Produces;
+
+@ApplicationScoped
+public class Generator {
+
+ private java.util.Random random = new java.util.Random( System.currentTimeMillis() );
+
+ java.util.Random getRandom()
+ {
+ return random;
+ }
+
+ @Produces @Random int next() {
+ return getRandom().nextInt(100);
+ }
+
+}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Mock.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Mock.java 2009-01-17 19:58:42 UTC (rev 1047)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Mock.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.examples;
-
-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.webbeans.DeploymentType;
-
-@Target( { TYPE, METHOD })
-@Retention(RUNTIME)
-@Documented
-@DeploymentType
-public @interface Mock
-{
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Mock.java (from rev 1049, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Mock.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Mock.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Mock.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.test.examples;
+
+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.webbeans.DeploymentType;
+
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+public @interface Mock
+{
+
+}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/MockSentenceTranslator.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/MockSentenceTranslator.java 2009-01-17 19:58:42 UTC (rev 1047)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/MockSentenceTranslator.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,8 +0,0 @@
-package org.jboss.webbeans.examples;
-
-@Mock
-public class MockSentenceTranslator implements Translator {
- public String translate(String sentence) {
- return "Lorem ipsum dolor sit amet";
- }
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/MockSentenceTranslator.java (from rev 1049, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/MockSentenceTranslator.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/MockSentenceTranslator.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/MockSentenceTranslator.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,8 @@
+package org.jboss.webbeans.test.examples;
+
+@Mock
+public class MockSentenceTranslator implements Translator {
+ public String translate(String sentence) {
+ return "Lorem ipsum dolor sit amet";
+ }
+}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Random.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Random.java 2009-01-17 19:58:42 UTC (rev 1047)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Random.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,22 +0,0 @@
-package org.jboss.webbeans.examples;
-
-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.webbeans.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface Random
-{
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Random.java (from rev 1049, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Random.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Random.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Random.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.test.examples;
+
+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.webbeans.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface Random
+{
+
+}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceParser.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/SentenceParser.java 2009-01-17 19:58:42 UTC (rev 1047)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceParser.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,10 +0,0 @@
-package org.jboss.webbeans.examples;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class SentenceParser {
- public List<String> parse(String text) {
- return Arrays.asList( text.split("[.?]") );
- }
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceParser.java (from rev 1049, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/SentenceParser.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceParser.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceParser.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.test.examples;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class SentenceParser {
+ public List<String> parse(String text) {
+ return Arrays.asList( text.split("[.?]") );
+ }
+}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceTranslator.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/SentenceTranslator.java 2009-01-17 19:58:42 UTC (rev 1047)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceTranslator.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,10 +0,0 @@
-package org.jboss.webbeans.examples;
-
-import javax.ejb.Stateless;
-
-@Stateless
-public class SentenceTranslator implements Translator {
-public String translate(String sentence) {
- throw new UnsupportedOperationException();
-}
-}
\ No newline at end of file
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceTranslator.java (from rev 1049, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/SentenceTranslator.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceTranslator.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/SentenceTranslator.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.test.examples;
+
+import javax.ejb.Stateless;
+
+@Stateless
+public class SentenceTranslator implements Translator {
+public String translate(String sentence) {
+ throw new UnsupportedOperationException();
+}
+}
\ No newline at end of file
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Tests.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Tests.java 2009-01-17 19:58:42 UTC (rev 1047)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Tests.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,107 +0,0 @@
-package org.jboss.webbeans.examples;
-
-import java.lang.reflect.Method;
-import java.util.Arrays;
-
-import javax.webbeans.Production;
-import javax.webbeans.Standard;
-
-import org.jboss.webbeans.bean.ProducerMethodBean;
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.context.DependentContext;
-import org.jboss.webbeans.test.AbstractTest;
-import org.testng.annotations.Test;
-
-public class Tests extends AbstractTest
-{
- @Test
- public void testGameGenerator() throws Exception {
- setupGameGenerator();
-
- try
- {
- DependentContext.INSTANCE.setActive(true);
- Game game1 = manager.getInstanceByType(Game.class);
- Game game2 = manager.getInstanceByType(Game.class);
- assert game1!=game2;
- assert game1.getNumber()!=game2.getNumber();
- Generator gen1 = manager.getInstanceByType(Generator.class);
- Generator gen2 = manager.getInstanceByType(Generator.class);
- assert gen1.getRandom()!=null;
- assert gen1.getRandom()==gen2.getRandom();
- }
- finally
- {
- DependentContext.INSTANCE.setActive(false);
- }
- }
-
- private void setupGameGenerator() throws NoSuchMethodException
- {
- SimpleBean<Game> gameBean = SimpleBean.of(Game.class, manager);
- SimpleBean<Generator> generatorBean = SimpleBean.of(Generator.class, manager);
- Method method = Generator.class.getDeclaredMethod("next");
- method.setAccessible(true);
- ProducerMethodBean<Integer> nextBean = ProducerMethodBean.of(method, generatorBean, manager);
-
- manager.addBean(gameBean);
- manager.addBean(generatorBean);
- manager.addBean(nextBean);
- }
-
- @Test
- public void testMockSentenceTranslator() throws Exception {
- setupTextTranslator();
-
- manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, Production.class, Mock.class));
-
- try
- {
- DependentContext.INSTANCE.setActive(true);
- 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?") );
- }
- finally
- {
- DependentContext.INSTANCE.setActive(false);
- }
- }
-
- @Test
- public void testSentenceTranslator() throws Exception {
- setupTextTranslator();
-
- try
- {
- DependentContext.INSTANCE.setActive(true);
- TextTranslator tt1 = manager.getInstanceByType(TextTranslator.class);
- try
- {
- tt1.translate("hello world");
- assert false;
- }
- catch (UnsupportedOperationException uoe)
- {
- //expected
- }
- }
- finally
- {
- DependentContext.INSTANCE.setActive(false);
- }
- }
-
- private void setupTextTranslator()
- {
- SimpleBean<SentenceParser> spBean = SimpleBean.of(SentenceParser.class, manager);
- SimpleBean<SentenceTranslator> stBean = SimpleBean.of(SentenceTranslator.class, manager);
- SimpleBean<MockSentenceTranslator> mstBean = SimpleBean.of(MockSentenceTranslator.class, manager);
- SimpleBean<TextTranslator> ttBean = SimpleBean.of(TextTranslator.class, manager);
-
- manager.addBean(spBean);
- manager.addBean(stBean);
- manager.addBean(mstBean);
- manager.addBean(ttBean);
- }
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Tests.java (from rev 1049, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Tests.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Tests.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Tests.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,107 @@
+package org.jboss.webbeans.test.examples;
+
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+import javax.webbeans.Production;
+import javax.webbeans.Standard;
+
+import org.jboss.webbeans.bean.ProducerMethodBean;
+import org.jboss.webbeans.bean.SimpleBean;
+import org.jboss.webbeans.context.DependentContext;
+import org.jboss.webbeans.test.unit.AbstractTest;
+import org.testng.annotations.Test;
+
+public class Tests extends AbstractTest
+{
+ @Test
+ public void testGameGenerator() throws Exception {
+ setupGameGenerator();
+
+ try
+ {
+ DependentContext.INSTANCE.setActive(true);
+ Game game1 = manager.getInstanceByType(Game.class);
+ Game game2 = manager.getInstanceByType(Game.class);
+ assert game1!=game2;
+ assert game1.getNumber()!=game2.getNumber();
+ Generator gen1 = manager.getInstanceByType(Generator.class);
+ Generator gen2 = manager.getInstanceByType(Generator.class);
+ assert gen1.getRandom()!=null;
+ assert gen1.getRandom()==gen2.getRandom();
+ }
+ finally
+ {
+ DependentContext.INSTANCE.setActive(false);
+ }
+ }
+
+ private void setupGameGenerator() throws NoSuchMethodException
+ {
+ SimpleBean<Game> gameBean = SimpleBean.of(Game.class, manager);
+ SimpleBean<Generator> generatorBean = SimpleBean.of(Generator.class, manager);
+ Method method = Generator.class.getDeclaredMethod("next");
+ method.setAccessible(true);
+ ProducerMethodBean<Integer> nextBean = ProducerMethodBean.of(method, generatorBean, manager);
+
+ manager.addBean(gameBean);
+ manager.addBean(generatorBean);
+ manager.addBean(nextBean);
+ }
+
+ @Test
+ public void testMockSentenceTranslator() throws Exception {
+ setupTextTranslator();
+
+ manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, Production.class, Mock.class));
+
+ try
+ {
+ DependentContext.INSTANCE.setActive(true);
+ 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?") );
+ }
+ finally
+ {
+ DependentContext.INSTANCE.setActive(false);
+ }
+ }
+
+ @Test
+ public void testSentenceTranslator() throws Exception {
+ setupTextTranslator();
+
+ try
+ {
+ DependentContext.INSTANCE.setActive(true);
+ TextTranslator tt1 = manager.getInstanceByType(TextTranslator.class);
+ try
+ {
+ tt1.translate("hello world");
+ assert false;
+ }
+ catch (UnsupportedOperationException uoe)
+ {
+ //expected
+ }
+ }
+ finally
+ {
+ DependentContext.INSTANCE.setActive(false);
+ }
+ }
+
+ private void setupTextTranslator()
+ {
+ SimpleBean<SentenceParser> spBean = SimpleBean.of(SentenceParser.class, manager);
+ SimpleBean<SentenceTranslator> stBean = SimpleBean.of(SentenceTranslator.class, manager);
+ SimpleBean<MockSentenceTranslator> mstBean = SimpleBean.of(MockSentenceTranslator.class, manager);
+ SimpleBean<TextTranslator> ttBean = SimpleBean.of(TextTranslator.class, manager);
+
+ manager.addBean(spBean);
+ manager.addBean(stBean);
+ manager.addBean(mstBean);
+ manager.addBean(ttBean);
+ }
+
+}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/TextTranslator.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/TextTranslator.java 2009-01-17 19:58:42 UTC (rev 1047)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/TextTranslator.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,23 +0,0 @@
-package org.jboss.webbeans.examples;
-
-import javax.webbeans.Initializer;
-
-public class TextTranslator {
- private SentenceParser sentenceParser;
- private Translator sentenceTranslator;
-
- @Initializer
- TextTranslator(SentenceParser sentenceParser, Translator sentenceTranslator) {
- this.sentenceParser = sentenceParser;
- this.sentenceTranslator = sentenceTranslator;
- }
-
- public String translate(String text) {
- StringBuilder sb = new StringBuilder();
- for (String sentence: sentenceParser.parse(text)) {
- sb.append(sentenceTranslator.translate(sentence)).append(". ");
- }
- return sb.toString().trim();
- }
-
-}
\ No newline at end of file
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/TextTranslator.java (from rev 1049, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/TextTranslator.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/TextTranslator.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/TextTranslator.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,23 @@
+package org.jboss.webbeans.test.examples;
+
+import javax.webbeans.Initializer;
+
+public class TextTranslator {
+ private SentenceParser sentenceParser;
+ private Translator sentenceTranslator;
+
+ @Initializer
+ TextTranslator(SentenceParser sentenceParser, Translator sentenceTranslator) {
+ this.sentenceParser = sentenceParser;
+ this.sentenceTranslator = sentenceTranslator;
+ }
+
+ public String translate(String text) {
+ StringBuilder sb = new StringBuilder();
+ for (String sentence: sentenceParser.parse(text)) {
+ sb.append(sentenceTranslator.translate(sentence)).append(". ");
+ }
+ return sb.toString().trim();
+ }
+
+}
\ No newline at end of file
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Translator.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Translator.java 2009-01-17 19:58:42 UTC (rev 1047)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Translator.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,8 +0,0 @@
-package org.jboss.webbeans.examples;
-
-import javax.ejb.Local;
-
-@Local
-public interface Translator {
- public String translate(String sentence);
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Translator.java (from rev 1049, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Translator.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Translator.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/examples/Translator.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,8 @@
+package org.jboss.webbeans.test.examples;
+
+import javax.ejb.Local;
+
+@Local
+public interface Translator {
+ public String translate(String sentence);
+}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockApplicationContext.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockApplicationContext.java 2009-01-17 20:11:52 UTC (rev 1049)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockApplicationContext.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,16 +0,0 @@
-package org.jboss.webbeans.test.mock;
-
-import org.jboss.webbeans.context.ApplicationContext;
-import org.jboss.webbeans.context.beanmap.SimpleBeanMap;
-
-public class MockApplicationContext extends ApplicationContext
-{
-
- public MockApplicationContext()
- {
- super();
- ApplicationContext.INSTANCE = this;
- setBeanMap(new SimpleBeanMap());
- }
-
-}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java 2009-01-17 20:11:52 UTC (rev 1049)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -22,6 +22,10 @@
import org.jboss.webbeans.resource.AbstractNaming;
import org.jboss.webbeans.resources.spi.Naming;
import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.test.mock.context.MockApplicationContext;
+import org.jboss.webbeans.test.mock.context.MockDependentContext;
+import org.jboss.webbeans.test.mock.context.MockRequestContext;
+import org.jboss.webbeans.test.mock.context.MockSessionContext;
public class MockBootstrap extends WebBeansBootstrap
{
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockDependentContext.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockDependentContext.java 2009-01-17 20:11:52 UTC (rev 1049)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockDependentContext.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.mock;
-
-import org.jboss.webbeans.context.DependentContext;
-
-public class MockDependentContext extends DependentContext
-{
-
- public MockDependentContext()
- {
- super();
- DependentContext.INSTANCE = this;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockInitialContext.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockInitialContext.java 2009-01-17 20:11:52 UTC (rev 1049)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockInitialContext.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,17 +0,0 @@
-package org.jboss.webbeans.test.mock;
-
-import java.util.Hashtable;
-
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-public class MockInitialContext extends InitialContext
-{
-
- public MockInitialContext(Hashtable<?, ?> arg0) throws NamingException
- {
- super(arg0);
- // TODO Auto-generated constructor stub
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockRequestContext.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockRequestContext.java 2009-01-17 20:11:52 UTC (rev 1049)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockRequestContext.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.mock;
-
-import org.jboss.webbeans.context.RequestContext;
-
-public class MockRequestContext extends RequestContext
-{
-
- public MockRequestContext()
- {
- super();
- RequestContext.INSTANCE = this;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockSessionContext.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockSessionContext.java 2009-01-17 20:11:52 UTC (rev 1049)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockSessionContext.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -1,16 +0,0 @@
-package org.jboss.webbeans.test.mock;
-
-import org.jboss.webbeans.context.SessionContext;
-import org.jboss.webbeans.context.beanmap.SimpleBeanMap;
-
-public class MockSessionContext extends SessionContext
-{
-
- public MockSessionContext()
- {
- super();
- SessionContext.INSTANCE = this;
- setBeanMap(new SimpleBeanMap());
- }
-
-}
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockApplicationContext.java (from rev 1047, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockApplicationContext.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockApplicationContext.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockApplicationContext.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.test.mock.context;
+
+import org.jboss.webbeans.context.ApplicationContext;
+import org.jboss.webbeans.context.beanmap.SimpleBeanMap;
+
+public class MockApplicationContext extends ApplicationContext
+{
+
+ public MockApplicationContext()
+ {
+ super();
+ ApplicationContext.INSTANCE = this;
+ setBeanMap(new SimpleBeanMap());
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockApplicationContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockDependentContext.java (from rev 1047, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockDependentContext.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockDependentContext.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockDependentContext.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.test.mock.context;
+
+import org.jboss.webbeans.context.DependentContext;
+
+public class MockDependentContext extends DependentContext
+{
+
+ public MockDependentContext()
+ {
+ super();
+ DependentContext.INSTANCE = this;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockDependentContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockRequestContext.java (from rev 1047, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockRequestContext.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockRequestContext.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockRequestContext.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.test.mock.context;
+
+import org.jboss.webbeans.context.RequestContext;
+
+public class MockRequestContext extends RequestContext
+{
+
+ public MockRequestContext()
+ {
+ super();
+ RequestContext.INSTANCE = this;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockRequestContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockSessionContext.java (from rev 1047, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockSessionContext.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockSessionContext.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockSessionContext.java 2009-01-17 20:20:08 UTC (rev 1050)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.test.mock.context;
+
+import org.jboss.webbeans.context.SessionContext;
+import org.jboss.webbeans.context.beanmap.SimpleBeanMap;
+
+public class MockSessionContext extends SessionContext
+{
+
+ public MockSessionContext()
+ {
+ super();
+ SessionContext.INSTANCE = this;
+ setBeanMap(new SimpleBeanMap());
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/context/MockSessionContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/unit-tests.xml
===================================================================
--- ri/trunk/webbeans-ri/unit-tests.xml 2009-01-17 20:11:52 UTC (rev 1049)
+++ ri/trunk/webbeans-ri/unit-tests.xml 2009-01-17 20:20:08 UTC (rev 1050)
@@ -33,8 +33,7 @@
</run>
</groups>
<packages>
- <package name="org.jboss.webbeans.test" />
- <package name="org.jboss.webbeans.examples" />
+ <package name="org.jboss.webbeans.test.examples" />
<package name="org.jboss.webbeans.test.unit.bootstrap" />
<package name="org.jboss.webbeans.test.unit.context" />
<package name="org.jboss.webbeans.test.unit.definition" />
17 years, 2 months
[webbeans-commits] Webbeans SVN: r1049 - in ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test: annotations and 9 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-17 15:11:52 -0500 (Sat, 17 Jan 2009)
New Revision: 1049
Added:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractEjbEmbeddableTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Synchronous.java
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractEjbEmbeddableTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecAssertion.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecVersion.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnimalOrderStereotype.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnimalStereotype.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnotherDeploymentType.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnotherScopeType.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Asynchronous.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Chunky.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Expensive.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/FishStereotype.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/HeavyDuty.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/HornedAnimalDeploymentType.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/HornedMammalStereotype.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/MammalStereotype.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/MessageDriven.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Modern.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Motorized.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/RequestScopedAnimalStereotype.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/RiverFishStereotype.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Role.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Singleton.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Synchronous.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Tame.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Whitefish.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/broken/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Animal.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/AnimalFarmer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Antelope.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BananaSpider.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Barn.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BeanWithInjectionPointMetadata.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BeanWithTooManyScopeTypes.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Bear.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BlackWidow.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cat.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Chair.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cheetah.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Chicken.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ChickenHutch.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cod.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ConstructorInjectionPointBean.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cow.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DaddyLongLegs.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DangerCall.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DeadlyAnimal.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DeadlySpider.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DefangedTarantula.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DependentFinalTuna.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Donkey.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Duck.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Elephant.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Farm.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FarmOffice.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Farmer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FieldInjectionPointBean.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FishFarm.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FishFarmOffice.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FishPond.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Fox.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FoxRun.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FunnelWeaver.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Giraffe.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Goldfish.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Grayling.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Haddock.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Halibut.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/HighlandCow.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Horse.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/InitializedObserver.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/InitializedObserverWhichUsesApplicationContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/InitializedObserverWhichUsesRequestContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/LadybirdSpider.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Leopard.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Lion.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Minnow.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Moose.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Mullet.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Order.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/OtherSpiderProducer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Panther.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Plaice.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Plough.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Pollock.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Puma.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/RedSnapper.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Reindeer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Rhinoceros.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/RoundWhitefish.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Salmon.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ScottishFish.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ScottishFishFarmer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/SeaBass.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Sheep.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Sole.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Spider.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/SpiderNest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/SpiderProducer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tarantula.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TarantulaProducer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tiger.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tractor.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TrapdoorSpider.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tuna.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TunaFarm.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TunedTuna.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Turkey.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/WolfSpider.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/broken/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/nonBeans/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/bindings/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockEjbDescriptor.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BoostrapTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/DeferredEventNotificationTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Tuna.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java
Log:
Clean up the testsuite :-)
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractEjbEmbeddableTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractEjbEmbeddableTest.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractEjbEmbeddableTest.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,72 +0,0 @@
-package org.jboss.webbeans.test;
-
-import java.net.URL;
-import java.util.Properties;
-
-import javax.ejb.EJBContainer;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.AfterSuite;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.BeforeSuite;
-
-
-
-public abstract class AbstractEjbEmbeddableTest extends AbstractTest
-{
-
- private EJBContainer ejbContainer;
-
- @AfterSuite
- public void afterClass() throws Exception
- {
- EJBContainer current = EJBContainer.getCurrentEJBContainer();
- if(current != null)
- {
- current.close();
- }
- }
-
- @BeforeSuite
- public void beforeClass() throws Exception
- {
- Properties properties = new Properties();
- String module = getURLToTestClasses(getTestClassesPath());
- properties.setProperty(EJBContainer.EMBEDDABLE_MODULES_PROPERTY, module);
- this.ejbContainer = EJBContainer.createEJBContainer(properties);
- }
-
- @BeforeMethod
- public void before() throws Exception
- {
- super.before();
- webBeansBootstrap.getNaming().setContext(new InitialContext());
- }
-
- @AfterMethod
- public void after() throws Exception
- {
- webBeansBootstrap.getNaming().setContext(null);
- }
-
-
- protected String getTestClassesPath()
- {
- return "org/jboss/webbeans/test";
- }
-
- private static String getURLToTestClasses(String path)
- {
- URL url = Thread.currentThread().getContextClassLoader().getResource(path);
- String s = url.toString();
- return s.substring(0, s.length() - path.length());
- }
-
- public Context getContext()
- {
- return webBeansBootstrap.getNaming().getContext();
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,187 +0,0 @@
-package org.jboss.webbeans.test;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-
-import javax.webbeans.Production;
-import javax.webbeans.Standard;
-
-import org.jboss.webbeans.CurrentManager;
-import org.jboss.webbeans.ManagerImpl;
-import org.jboss.webbeans.bean.AbstractClassBean;
-import org.jboss.webbeans.bean.AbstractProducerBean;
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.bean.ProducerFieldBean;
-import org.jboss.webbeans.bean.ProducerMethodBean;
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.context.DependentContext;
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-import org.jboss.webbeans.test.annotations.HornedAnimalDeploymentType;
-import org.jboss.webbeans.test.mock.MockBootstrap;
-import org.jboss.webbeans.test.mock.MockEjbDescriptor;
-import org.testng.annotations.BeforeMethod;
-
-public class AbstractTest
-{
-
- protected abstract static class RunInDependentContext
- {
-
- protected void setup()
- {
- AbstractTest.activateDependentContext();
- }
-
- protected void cleanup()
- {
- AbstractTest.deactivateDependentContext();
- }
-
- 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 MockBootstrap webBeansBootstrap;
-
- public static boolean visited = false;
-
- @BeforeMethod
- public void before() throws Exception
- {
- webBeansBootstrap = new MockBootstrap();
- manager = webBeansBootstrap.getManager();
- addStandardDeploymentTypesForTests();
- }
-
- private boolean hasField(Class<?> clazz, String name)
- {
- try
- {
- Field field = clazz.getDeclaredField(name);
- }
- catch (NoSuchFieldException e)
- {
- return false;
- }
- return true;
- }
-
- private Method getMethod(Class<?> clazz, String name)
- {
- for (Method method : clazz.getDeclaredMethods())
- {
- if (method.getName().equals(name))
- {
- return method;
- }
- }
- return null;
- }
-
- protected AbstractProducerBean<?, ?> registerProducerBean(Class<?> producerBeanClass, String fieldOrMethodName, Class<?> productClass)
- {
- SimpleBean<?> producerContainerBean = SimpleBean.of(producerBeanClass, manager);
- manager.addBean(producerContainerBean);
- AbstractProducerBean<?, ?> producerBean = null;
- try
- {
- if (hasField(producerBeanClass, fieldOrMethodName))
- {
- Field producerField = producerBeanClass.getDeclaredField(fieldOrMethodName);
- producerBean = ProducerFieldBean.of(producerField, producerContainerBean, manager);
- }
- else
- {
- Method producerMethod = getMethod(producerBeanClass, fieldOrMethodName);
- producerBean = ProducerMethodBean.of(producerMethod, producerContainerBean, manager);
- }
- }
- catch (Exception e)
- {
- throw new RuntimeException("Could not initialize producer bean", e);
- }
- manager.addBean(producerBean);
- return producerBean;
- }
-
-
- protected <T> AbstractClassBean<T> registerBean(Class<T> clazz)
- {
- AbstractClassBean<T> bean = null;
- if (CurrentManager.rootManager().getEjbDescriptorCache().containsKey(clazz))
- {
- bean = EnterpriseBean.of(clazz, manager);
- }
- else
- {
- bean = SimpleBean.of(clazz, manager);
- }
- CurrentManager.rootManager().addBean(bean);
- return bean;
- }
-
- protected void registerBeans(Class<?>[] classes)
- {
- for (Class<?> clazz : classes)
- {
- registerBean(clazz);
- }
- }
-
- @SuppressWarnings("unchecked")
- protected void addStandardDeploymentTypesForTests()
- {
- manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, Production.class, AnotherDeploymentType.class, HornedAnimalDeploymentType.class));
- }
-
- protected <T> void addToEjbCache(Class<T> clazz)
- {
- manager.getEjbDescriptorCache().add(MockEjbDescriptor.of(clazz));
- }
-
- protected byte[] serialize(Object instance) throws IOException
- {
- ByteArrayOutputStream bytes = new ByteArrayOutputStream();
- ObjectOutputStream out = new ObjectOutputStream(bytes);
- out.writeObject(instance);
- return bytes.toByteArray();
- }
-
- protected Object deserialize(byte[] bytes) throws IOException, ClassNotFoundException
- {
- ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes));
- return in.readObject();
- }
-
- protected static void activateDependentContext()
- {
- DependentContext.INSTANCE.setActive(true);
- }
-
- protected static void deactivateDependentContext()
- {
- DependentContext.INSTANCE.setActive(false);
- }
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecAssertion.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecAssertion.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecAssertion.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,16 +0,0 @@
-package org.jboss.webbeans.test;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Target;
-
-(a)Target(ElementType.METHOD)
-@Documented
-public @interface SpecAssertion
-{
-
- public String[] section();
-
- public String note() default "";
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecVersion.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecVersion.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SpecVersion.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,13 +0,0 @@
-package org.jboss.webbeans.test;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Target;
-
-@Documented
-(a)Target(ElementType.TYPE)
-public @interface SpecVersion {
-
- String value();
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnimalOrderStereotype.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnimalOrderStereotype.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnimalOrderStereotype.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.webbeans.Stereotype;
-
-import org.jboss.webbeans.test.beans.Animal;
-import org.jboss.webbeans.test.beans.Order;
-
-(a)Stereotype(requiredTypes={Animal.class, Order.class})
-@Target( { TYPE })
-@Retention(RUNTIME)
-public @interface AnimalOrderStereotype
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnimalStereotype.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnimalStereotype.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnimalStereotype.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,23 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.ElementType.FIELD;
-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.Retention;
-import java.lang.annotation.Target;
-
-import javax.webbeans.RequestScoped;
-import javax.webbeans.Stereotype;
-
-import org.jboss.webbeans.test.beans.Animal;
-
-(a)Stereotype(requiredTypes=Animal.class)
-@Target( { TYPE, METHOD, FIELD })
-@Retention(RUNTIME)
-@RequestScoped
-public @interface AnimalStereotype
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnotherDeploymentType.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnotherDeploymentType.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnotherDeploymentType.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-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.webbeans.DeploymentType;
-
-@Target( { TYPE, METHOD })
-@Retention(RUNTIME)
-@Documented
-@DeploymentType
-public @interface AnotherDeploymentType
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnotherScopeType.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnotherScopeType.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/AnotherScopeType.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-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.webbeans.ScopeType;
-
-@Target( { TYPE, METHOD })
-@Retention(RUNTIME)
-@Documented
-@ScopeType
-public @interface AnotherScopeType
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Asynchronous.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Asynchronous.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Asynchronous.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,21 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-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.webbeans.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface Asynchronous
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Chunky.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Chunky.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Chunky.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,24 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-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.webbeans.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface Chunky
-{
-
- boolean realChunky();
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Expensive.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Expensive.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Expensive.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,28 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-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.webbeans.BindingType;
-import javax.webbeans.NonBinding;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface Expensive
-{
-
- boolean veryExpensive();
-
- @NonBinding
- int cost();
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/FishStereotype.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/FishStereotype.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/FishStereotype.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,23 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.webbeans.ApplicationScoped;
-import javax.webbeans.Named;
-import javax.webbeans.Stereotype;
-
-import org.jboss.webbeans.test.beans.Animal;
-
-(a)Stereotype(requiredTypes=Animal.class)
-@Target( { TYPE })
-@Retention(RUNTIME)
-@ApplicationScoped
-@Named
-public @interface FishStereotype
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/HeavyDuty.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/HeavyDuty.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/HeavyDuty.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,21 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-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.webbeans.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface HeavyDuty
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/HornedAnimalDeploymentType.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/HornedAnimalDeploymentType.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/HornedAnimalDeploymentType.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-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.webbeans.DeploymentType;
-
-@Target( { TYPE, METHOD })
-@Retention(RUNTIME)
-@Documented
-@DeploymentType
-public @interface HornedAnimalDeploymentType
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/HornedMammalStereotype.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/HornedMammalStereotype.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/HornedMammalStereotype.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.webbeans.Stereotype;
-
-import org.jboss.webbeans.test.beans.Animal;
-
-(a)Stereotype(requiredTypes=Animal.class)
-@Target( { TYPE })
-@Retention(RUNTIME)
-@HornedAnimalDeploymentType
-public @interface HornedMammalStereotype
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/MammalStereotype.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/MammalStereotype.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/MammalStereotype.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.webbeans.Stereotype;
-
-import org.jboss.webbeans.test.beans.Animal;
-
-(a)Stereotype(requiredTypes=Animal.class)
-@Target( { TYPE })
-@Retention(RUNTIME)
-@AnotherDeploymentType
-public @interface MammalStereotype
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/MessageDriven.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/MessageDriven.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/MessageDriven.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,13 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-(a)Retention(RetentionPolicy.RUNTIME)
-(a)Target(ElementType.TYPE)
-public @interface MessageDriven
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Modern.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Modern.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Modern.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-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.webbeans.DeploymentType;
-
-@Target( { TYPE, METHOD })
-@Retention(RUNTIME)
-@Documented
-@DeploymentType
-public @interface Modern
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Motorized.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Motorized.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Motorized.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,21 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-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.webbeans.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface Motorized
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/RequestScopedAnimalStereotype.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/RequestScopedAnimalStereotype.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/RequestScopedAnimalStereotype.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,20 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.webbeans.RequestScoped;
-import javax.webbeans.Stereotype;
-
-import org.jboss.webbeans.test.beans.Animal;
-
-(a)Stereotype(requiredTypes=Animal.class, supportedScopes=RequestScoped.class)
-@Target( { TYPE })
-@Retention(RUNTIME)
-public @interface RequestScopedAnimalStereotype
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/RiverFishStereotype.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/RiverFishStereotype.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/RiverFishStereotype.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,21 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.webbeans.ApplicationScoped;
-import javax.webbeans.Stereotype;
-
-import org.jboss.webbeans.test.beans.Animal;
-
-(a)Stereotype(requiredTypes=Animal.class)
-@Target( { TYPE })
-@Retention(RUNTIME)
-@ApplicationScoped
-public @interface RiverFishStereotype
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Role.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Role.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Role.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-
-import javax.webbeans.BindingType;
-
-@BindingType
-@Retention(RUNTIME)
-public @interface Role
-{
- String value();
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Singleton.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Singleton.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Singleton.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-@Target(value=TYPE)
-@Retention(value=RUNTIME)
-public @interface Singleton
-{
- // EJB 3.1. Fake it 'til you make it.
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Synchronous.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Synchronous.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Synchronous.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,21 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-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.webbeans.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface Synchronous
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Tame.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Tame.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Tame.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,22 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-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.webbeans.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface Tame
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Whitefish.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Whitefish.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/annotations/Whitefish.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,22 +0,0 @@
-package org.jboss.webbeans.test.annotations;
-
-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.webbeans.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface Whitefish
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Animal.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Animal.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Animal.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public interface Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/AnimalFarmer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/AnimalFarmer.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/AnimalFarmer.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public class AnimalFarmer extends Farmer<Animal>
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Antelope.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Antelope.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Antelope.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public class Antelope implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BananaSpider.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BananaSpider.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BananaSpider.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,23 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import java.util.Set;
-
-import javax.webbeans.Observer;
-import javax.webbeans.Observes;
-import javax.webbeans.manager.Manager;
-
-/**
- * Simple bean with observer method and another injectable parameter.
- *
- */
-public class BananaSpider
-{
- public void observeStringEvent(@Observes String someEvent, Manager manager)
- {
- assert someEvent != null;
- assert manager != null;
- Set<Observer<String>> allStringObservers = manager.resolveObservers(someEvent);
- assert allStringObservers != null;
- assert allStringObservers.size() > 0;
- }
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Barn.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Barn.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Barn.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import org.jboss.webbeans.test.annotations.Tame;
-
-public class Barn
-{
-
- @Tame
- public Tarantula petSpider;
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BeanWithInjectionPointMetadata.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BeanWithInjectionPointMetadata.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BeanWithInjectionPointMetadata.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Current;
-import javax.webbeans.InjectionPoint;
-
-/**
- * Test bean with injection point on the constructor of the bean
- *
- * @author David Allen
- *
- */
-public class BeanWithInjectionPointMetadata
-{
- @Current
- private InjectionPoint injectedMetadata;
-
- public InjectionPoint getInjectedMetadata()
- {
- return injectedMetadata;
- }
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BeanWithTooManyScopeTypes.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BeanWithTooManyScopeTypes.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BeanWithTooManyScopeTypes.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.ConversationScoped;
-import javax.webbeans.RequestScoped;
-
-@RequestScoped
-@ConversationScoped
-public class BeanWithTooManyScopeTypes
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Bear.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Bear.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Bear.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,13 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.ejb.Stateless;
-import javax.webbeans.Production;
-import javax.webbeans.RequestScoped;
-
-@Production
-@RequestScoped
-@Stateless
-public class Bear
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BlackWidow.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BlackWidow.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/BlackWidow.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public class BlackWidow extends Spider implements DeadlySpider
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cat.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cat.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cat.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Production;
-
-import org.jboss.webbeans.test.annotations.Synchronous;
-
-@Production
-@Synchronous
-public class Cat
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Chair.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Chair.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Chair.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import org.jboss.webbeans.test.annotations.AnimalStereotype;
-
-@AnimalStereotype
-public class Chair
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cheetah.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cheetah.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cheetah.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,18 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.ejb.Remove;
-import javax.webbeans.Destructor;
-import javax.webbeans.Production;
-
-@Production
-public class Cheetah
-{
-
- @Remove @Destructor
- public void remove()
- {
-
- }
-
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Chicken.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Chicken.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Chicken.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,10 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Production;
-
-@Production
-public class Chicken
-{
-
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ChickenHutch.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ChickenHutch.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ChickenHutch.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,23 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Initializer;
-
-public class ChickenHutch
-{
-
- public Fox fox;
- public Chicken chicken;
-
- @Initializer
- public void setFox(Fox fox)
- {
- this.fox = fox;
- }
-
- @Initializer
- public void setChicken(Chicken chicken)
- {
- this.chicken = chicken;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cod.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cod.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cod.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,16 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Named;
-import javax.webbeans.Production;
-
-import org.jboss.webbeans.test.annotations.Chunky;
-import org.jboss.webbeans.test.annotations.Whitefish;
-
-@Production
-@Whitefish
-@Chunky(realChunky=true)
-@Named("whitefish")
-public class Cod implements ScottishFish
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ConstructorInjectionPointBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ConstructorInjectionPointBean.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ConstructorInjectionPointBean.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Current;
-import javax.webbeans.Initializer;
-
-/**
- * Test bean to inject a bean using injection point metadata into a constructor
- *
- * @author David Allen
- *
- */
-public class ConstructorInjectionPointBean
-{
- private BeanWithInjectionPointMetadata injectedBean;
-
- @Initializer
- public ConstructorInjectionPointBean(@Current BeanWithInjectionPointMetadata injectedBean)
- {
- this.injectedBean = injectedBean;
- }
-
- public BeanWithInjectionPointMetadata getInjectedBean()
- {
- return injectedBean;
- }
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cow.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cow.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Cow.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Production;
-
-@Production
-public abstract class Cow
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DaddyLongLegs.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DaddyLongLegs.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DaddyLongLegs.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public class DaddyLongLegs extends Spider
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DangerCall.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DangerCall.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DangerCall.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Production;
-
-@Production
-public class DangerCall
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DeadlyAnimal.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DeadlyAnimal.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DeadlyAnimal.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public interface DeadlyAnimal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DeadlySpider.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DeadlySpider.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DeadlySpider.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public interface DeadlySpider extends DeadlyAnimal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DefangedTarantula.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DefangedTarantula.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DefangedTarantula.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public class DefangedTarantula extends Tarantula
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DependentFinalTuna.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DependentFinalTuna.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/DependentFinalTuna.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-
-@AnotherDeploymentType
-public final class DependentFinalTuna
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Donkey.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Donkey.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Donkey.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,19 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Production;
-
-@Production
-public class Donkey
-{
-
- public Donkey()
- {
-
- }
-
- public Donkey(String foo)
- {
-
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Duck.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Duck.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Duck.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,18 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Initializer;
-import javax.webbeans.Production;
-
-import org.jboss.webbeans.test.annotations.Synchronous;
-
-@Production
-public class Duck
-{
-
- @Initializer
- public Duck(String foo, @Synchronous Integer bar)
- {
-
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Elephant.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Elephant.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Elephant.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,25 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.webbeans.Destructor;
-import javax.webbeans.Production;
-
-@Production
-@Stateful
-public class Elephant
-{
-
- @Remove
- public void remove1()
- {
-
- }
-
- @Remove @Destructor
- public void remove2()
- {
-
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Farm.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Farm.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Farm.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,32 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import java.util.Date;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.webbeans.Current;
-
-public class Farm
-{
-
- public Date founded;
- public Date closed;
- public int initialStaff;
-
- @Current
- FarmOffice farmOffice;
-
- @PostConstruct
- private void postConstruct()
- {
- founded = new Date();
- initialStaff = farmOffice.noOfStaff;
- }
-
- @PreDestroy
- private void preDestroy()
- {
- closed = new Date();
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FarmOffice.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FarmOffice.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FarmOffice.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-
-public class FarmOffice
-{
-
- public int noOfStaff = 20;
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Farmer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Farmer.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Farmer.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Production;
-
-@Production
-public class Farmer<T>
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FieldInjectionPointBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FieldInjectionPointBean.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FieldInjectionPointBean.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Current;
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.test.annotations.AnimalStereotype;
-
-/**
- * Test bean to inject another bean which uses injection point metadata in a
- * field
- *
- * @author David Allen
- *
- */
-@RequestScoped
-public class FieldInjectionPointBean
-{
- @Current @AnimalStereotype
- private BeanWithInjectionPointMetadata injectedBean;
-
- public BeanWithInjectionPointMetadata getInjectedBean()
- {
- return injectedBean;
- }
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FishFarm.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FishFarm.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FishFarm.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,41 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Current;
-import javax.webbeans.Production;
-
-import org.jboss.webbeans.test.annotations.Chunky;
-import org.jboss.webbeans.test.annotations.Expensive;
-import org.jboss.webbeans.test.annotations.Whitefish;
-
-@Production
-public 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/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FishFarmOffice.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FishFarmOffice.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FishFarmOffice.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Current;
-import javax.webbeans.manager.Manager;
-
-public class FishFarmOffice
-{
-
- @Current public Manager manager;
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FishPond.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FishPond.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FishPond.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,17 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Initializer;
-
-public class FishPond
-{
-
- public Animal goldfish;
-
- @Initializer
- public FishPond(Goldfish goldfish)
- {
- this.goldfish = goldfish;
- }
-
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Fox.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Fox.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Fox.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Dependent;
-
-@Dependent
-public class Fox
-{
-
- public String getName()
- {
- return "gavin";
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FoxRun.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FoxRun.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FoxRun.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Current;
-
-public class FoxRun
-{
-
- @Current
- public Fox fox;
-
- @Current
- public Fox anotherFox;
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FunnelWeaver.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FunnelWeaver.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/FunnelWeaver.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public class FunnelWeaver<T>
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Giraffe.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Giraffe.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Giraffe.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.ejb.Stateless;
-
-@Stateless
-public class Giraffe
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Goldfish.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Goldfish.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Goldfish.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Production;
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.test.annotations.RequestScopedAnimalStereotype;
-
-@RequestScopedAnimalStereotype
-@RequestScoped
-@Production
-public class Goldfish implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Grayling.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Grayling.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Grayling.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import org.jboss.webbeans.test.annotations.FishStereotype;
-import org.jboss.webbeans.test.annotations.RiverFishStereotype;
-
-
-@RiverFishStereotype
-@FishStereotype
-public class Grayling implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Haddock.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Haddock.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Haddock.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Named;
-import javax.webbeans.Production;
-
-@Production
-@Named
-public class Haddock implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Halibut.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Halibut.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Halibut.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import org.jboss.webbeans.test.annotations.Expensive;
-import org.jboss.webbeans.test.annotations.Whitefish;
-
-@Expensive(cost=50, veryExpensive=true)
-@Whitefish
-public class Halibut implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/HighlandCow.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/HighlandCow.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/HighlandCow.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,16 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.test.annotations.HornedMammalStereotype;
-import org.jboss.webbeans.test.annotations.RequestScopedAnimalStereotype;
-import org.jboss.webbeans.test.annotations.Tame;
-
-@HornedMammalStereotype
-@RequestScopedAnimalStereotype
-@RequestScoped
-@Tame
-public class HighlandCow implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Horse.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Horse.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Horse.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Production;
-import javax.webbeans.RequestScoped;
-
-@Production
-@RequestScoped
-public final class Horse
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/InitializedObserver.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/InitializedObserver.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/InitializedObserver.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,17 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Observes;
-import javax.webbeans.manager.Initialized;
-import javax.webbeans.manager.Manager;
-
-public class InitializedObserver
-{
-
- public static boolean observered;
-
- public void observeInitialized(@Observes @Initialized Manager manager)
- {
- observered = true;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/InitializedObserverWhichUsesApplicationContext.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/InitializedObserverWhichUsesApplicationContext.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/InitializedObserverWhichUsesApplicationContext.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,18 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Current;
-import javax.webbeans.Observes;
-import javax.webbeans.manager.Initialized;
-import javax.webbeans.manager.Manager;
-
-public class InitializedObserverWhichUsesApplicationContext
-{
-
- @Current LadybirdSpider spider;
-
- public void observeInitialized(@Observes @Initialized Manager manager)
- {
- spider.spinWeb();
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/InitializedObserverWhichUsesRequestContext.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/InitializedObserverWhichUsesRequestContext.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/InitializedObserverWhichUsesRequestContext.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,18 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Current;
-import javax.webbeans.Observes;
-import javax.webbeans.manager.Initialized;
-import javax.webbeans.manager.Manager;
-
-public class InitializedObserverWhichUsesRequestContext
-{
-
- @Current Tuna tuna;
-
- public void observeInitialized(@Observes @Initialized Manager manager)
- {
- tuna.getName();
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/LadybirdSpider.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/LadybirdSpider.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/LadybirdSpider.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.ApplicationScoped;
-
-@ApplicationScoped
-public class LadybirdSpider extends Spider
-{
-
- public void spinWeb()
- {
-
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Leopard.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Leopard.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Leopard.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,17 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.jms.Message;
-import javax.webbeans.Production;
-
-@Production
-//@MessageDriven
-public class Leopard implements javax.jms.MessageListener
-{
-
- public void onMessage(Message message)
- {
- // TODO Auto-generated method stub
-
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Lion.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Lion.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Lion.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,13 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.ejb.Stateless;
-import javax.webbeans.Named;
-import javax.webbeans.Production;
-
-@Production
-@Stateless
-@Named
-public class Lion
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Minnow.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Minnow.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Minnow.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.test.annotations.RiverFishStereotype;
-
-@RiverFishStereotype
-@RequestScoped
-public class Minnow implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Moose.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Moose.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Moose.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Named;
-
-import org.jboss.webbeans.test.annotations.MammalStereotype;
-
-@MammalStereotype
-@Named("aMoose")
-public class Moose implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Mullet.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Mullet.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Mullet.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import org.jboss.webbeans.test.annotations.AnotherScopeType;
-
-@AnotherScopeType
-public class Mullet
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Order.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Order.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Order.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Production;
-
-@Production
-public class Order
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/OtherSpiderProducer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/OtherSpiderProducer.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/OtherSpiderProducer.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,49 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Dependent;
-import javax.webbeans.Named;
-import javax.webbeans.Produces;
-import javax.webbeans.Production;
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.test.annotations.AnimalStereotype;
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-import org.jboss.webbeans.test.annotations.Tame;
-
-@AnotherDeploymentType
-public class OtherSpiderProducer
-{
-
- private static Spider[] ALL_SPIDERS = { new Tarantula(), new LadybirdSpider(), new DaddyLongLegs() };
-
- @Produces @Tame public Tarantula produceTameTarantula = new DefangedTarantula();
-
- @Produces public Tarantula produceTarantula = new Tarantula();
-
- @Produces @Dependent public final TrapdoorSpider produceTrapdoorSpider = new TrapdoorSpider();
-
- @Produces @Named("blackWidow") public BlackWidow produceBlackWidow = new BlackWidow();
-
- @Produces @Named @RequestScoped public DaddyLongLegs produceDaddyLongLegs = new DaddyLongLegs();
-
- @Produces @Named @Production public LadybirdSpider getLadybirdSpider = new LadybirdSpider();
-
- @Produces @Named("Shelob") public Tarantula produceShelob;
-
- @Produces @AnimalStereotype public WolfSpider produceWolfSpider = new WolfSpider();
-
- @Produces public Animal makeASpider = new WolfSpider();
-
- @Produces public int getWolfSpiderSize = 4;
-
- @Produces public Spider[] getSpiders = ALL_SPIDERS;
-
- @Produces public String[] getStrings = new String[0];
-
- @Produces public FunnelWeaver<?> getAnotherFunnelWeaver = new FunnelWeaver<Object>();
-
- @Produces public FunnelWeaver<Spider> getFunnelWeaverSpider = new FunnelWeaver<Spider>();
-
- @Produces public Spider getNullSpider = null;
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Panther.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Panther.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Panther.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,18 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.webbeans.Production;
-
-@Production
-@Stateful
-public class Panther
-{
-
- @Remove
- public void remove(String foo)
- {
-
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Plaice.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Plaice.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Plaice.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Named;
-
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-import org.jboss.webbeans.test.annotations.Whitefish;
-
-@AnotherDeploymentType
-@Whitefish
-@Named("whitefish")
-public final class Plaice implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Plough.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Plough.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Plough.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Named;
-
-import org.jboss.webbeans.test.annotations.HeavyDuty;
-
-@HeavyDuty
-@Named("plough")
-public class Plough
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Pollock.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Pollock.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Pollock.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Dependent;
-
-import org.jboss.webbeans.test.annotations.AnimalStereotype;
-import org.jboss.webbeans.test.annotations.FishStereotype;
-
-@AnimalStereotype
-@FishStereotype
-@Dependent
-public class Pollock implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Puma.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Puma.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Puma.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,21 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.ejb.Stateful;
-import javax.webbeans.Production;
-
-@Stateful
-@Production
-public class Puma
-{
-
- public void remove1()
- {
-
- }
-
- public void remove2()
- {
-
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/RedSnapper.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/RedSnapper.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/RedSnapper.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.test.annotations.FishStereotype;
-
-@FishStereotype
-@RequestScoped
-public class RedSnapper implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Reindeer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Reindeer.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Reindeer.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Production;
-
-import org.jboss.webbeans.test.annotations.HornedMammalStereotype;
-
-@HornedMammalStereotype
-@Production
-public class Reindeer implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Rhinoceros.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Rhinoceros.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Rhinoceros.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import org.jboss.webbeans.test.annotations.HornedMammalStereotype;
-import org.jboss.webbeans.test.annotations.MammalStereotype;
-
-@HornedMammalStereotype
-@MammalStereotype
-public class Rhinoceros implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/RoundWhitefish.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/RoundWhitefish.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/RoundWhitefish.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import org.jboss.webbeans.test.annotations.Expensive;
-import org.jboss.webbeans.test.annotations.Whitefish;
-
-@Expensive(cost=60, veryExpensive=true)
-@Whitefish
-public class RoundWhitefish implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Salmon.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Salmon.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Salmon.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Named;
-import javax.webbeans.Production;
-
-@Production
-@Named
-public class Salmon implements ScottishFish
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ScottishFish.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ScottishFish.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ScottishFish.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public interface ScottishFish extends Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ScottishFishFarmer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ScottishFishFarmer.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/ScottishFishFarmer.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Production;
-
-@Production
-public class ScottishFishFarmer extends Farmer<ScottishFish>
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/SeaBass.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/SeaBass.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/SeaBass.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Production;
-import javax.webbeans.RequestScoped;
-
-@Production
-@RequestScoped
-public class SeaBass implements Animal
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Sheep.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Sheep.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Sheep.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,16 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Initializer;
-import javax.webbeans.Production;
-
-@Production
-public class Sheep
-{
-
- @Initializer
- public Sheep(String foo, Double bar)
- {
-
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Sole.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Sole.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Sole.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Named;
-import javax.webbeans.Production;
-
-import org.jboss.webbeans.test.annotations.Whitefish;
-
-@Production
-@Whitefish
-@Named("whitefish")
-public class Sole implements ScottishFish
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Spider.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Spider.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Spider.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public class Spider implements Animal
-{
-
- public final void layEggs()
- {
-
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/SpiderNest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/SpiderNest.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/SpiderNest.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,16 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Initializer;
-
-public class SpiderNest
-{
-
- public Integer numberOfSpiders;
-
- @Initializer
- public SpiderNest(Integer numberOfSpiders)
- {
- this.numberOfSpiders = numberOfSpiders;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/SpiderProducer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/SpiderProducer.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/SpiderProducer.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,104 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Dependent;
-import javax.webbeans.Named;
-import javax.webbeans.Produces;
-import javax.webbeans.Production;
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.test.annotations.AnimalStereotype;
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-import org.jboss.webbeans.test.annotations.Tame;
-
-@AnotherDeploymentType
-public class SpiderProducer
-{
-
- private static Spider[] ALL_SPIDERS = { new Tarantula(), new LadybirdSpider(), new DaddyLongLegs() };
-
- @Produces @Tame public Tarantula produceTameTarantula()
- {
- return new DefangedTarantula();
- }
-
- @Produces public Tarantula produceTarantula()
- {
- return new Tarantula();
- }
-
- @Produces @Dependent public final TrapdoorSpider produceTrapdoorSpider()
- {
- return new TrapdoorSpider();
- }
-
- @Produces @Named("blackWidow") public BlackWidow produceBlackWidow()
- {
- return new BlackWidow();
- }
-
- @Produces @Named @RequestScoped public DaddyLongLegs produceDaddyLongLegs()
- {
- return new DaddyLongLegs();
- }
-
- @Produces @Named @Production public LadybirdSpider getLadybirdSpider()
- {
- return new LadybirdSpider();
- }
-
- @Produces @Named("Shelob") public Tarantula produceShelob()
- {
- return null;
- }
-
- @Produces @AnimalStereotype public WolfSpider produceWolfSpider()
- {
- return new WolfSpider();
- }
-
- @Produces public Animal makeASpider()
- {
- return new WolfSpider();
- }
-
- @Produces public int getWolfSpiderSize()
- {
- return 4;
- }
-
- @Produces public Spider[] getSpiders()
- {
- return ALL_SPIDERS;
- }
-
- @Produces public String[] getStrings()
- {
- return new String[0];
- }
-
- @Produces public <T> FunnelWeaver<T> getFunnelWeaver()
- {
- return new FunnelWeaver<T>();
- }
-
- @Produces public FunnelWeaver<?> getAnotherFunnelWeaver()
- {
- return new FunnelWeaver<Object>();
- }
-
- @Produces public FunnelWeaver<Spider> getFunnelWeaverSpider()
- {
- return new FunnelWeaver<Spider>();
- }
-
- @Produces public Spider getNullSpider()
- {
- return null;
- }
-
- @Produces public Spider produceSpiderFromInjection(@Tame Tarantula tarantula)
- {
- return tarantula;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tarantula.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tarantula.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tarantula.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public class Tarantula extends Spider implements DeadlySpider
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TarantulaProducer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TarantulaProducer.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TarantulaProducer.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,15 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Produces;
-
-import org.jboss.webbeans.test.annotations.Tame;
-
-public class TarantulaProducer
-{
-
- @Produces @Tame public Tarantula produceTameTarantula()
- {
- return new DefangedTarantula();
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tiger.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tiger.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tiger.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,21 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.webbeans.Production;
-
-import org.jboss.webbeans.test.annotations.Synchronous;
-
-@Production
-@Stateful
-@Synchronous
-public class Tiger
-{
-
- @Remove
- public void remove()
- {
-
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tractor.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tractor.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tractor.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Specializes;
-
-import org.jboss.webbeans.test.annotations.Modern;
-import org.jboss.webbeans.test.annotations.Motorized;
-
-@Modern @Motorized @Specializes
-public class Tractor extends Plough
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TrapdoorSpider.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TrapdoorSpider.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TrapdoorSpider.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public class TrapdoorSpider
-{
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tuna.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tuna.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Tuna.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,17 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-
-@AnotherDeploymentType
-@RequestScoped
-public class Tuna
-{
-
- public String getName()
- {
- return "Ophir";
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TunaFarm.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TunaFarm.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TunaFarm.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,17 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Current;
-import javax.webbeans.Production;
-
-@Production
-public class TunaFarm
-{
-
- @SuppressWarnings("unused")
- @Current
- public Tuna tuna;
-
- public Tuna notInjectedTuna = new Tuna();
-
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TunedTuna.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TunedTuna.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/TunedTuna.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,15 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-
-@AnotherDeploymentType
-@RequestScoped
-public class TunedTuna
-{
- public String getState()
- {
- return "tuned";
- }
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Turkey.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Turkey.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Turkey.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,21 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-import javax.webbeans.Initializer;
-import javax.webbeans.Production;
-
-@Production
-public class Turkey
-{
-
- public Turkey()
- {
-
- }
-
- @Initializer
- public Turkey(String foo, Integer bar)
- {
-
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/WolfSpider.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/WolfSpider.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/WolfSpider.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.beans;
-
-public class WolfSpider implements Animal
-{
-
-}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockEjbDescriptor.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockEjbDescriptor.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockEjbDescriptor.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -8,12 +8,12 @@
import javax.ejb.MessageDriven;
import javax.ejb.Remove;
+import javax.ejb.Singleton;
import javax.ejb.Stateful;
import javax.ejb.Stateless;
import org.jboss.webbeans.ejb.spi.BusinessInterfaceDescriptor;
import org.jboss.webbeans.ejb.spi.EjbDescriptor;
-import org.jboss.webbeans.test.annotations.Singleton;
public class MockEjbDescriptor<T> implements EjbDescriptor<T>
{
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractEjbEmbeddableTest.java (from rev 1047, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractEjbEmbeddableTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractEjbEmbeddableTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractEjbEmbeddableTest.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -0,0 +1,72 @@
+package org.jboss.webbeans.test.unit;
+
+import java.net.URL;
+import java.util.Properties;
+
+import javax.ejb.EJBContainer;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.BeforeSuite;
+
+
+
+public abstract class AbstractEjbEmbeddableTest extends AbstractTest
+{
+
+ private EJBContainer ejbContainer;
+
+ @AfterSuite
+ public void afterClass() throws Exception
+ {
+ EJBContainer current = EJBContainer.getCurrentEJBContainer();
+ if(current != null)
+ {
+ current.close();
+ }
+ }
+
+ @BeforeSuite
+ public void beforeClass() throws Exception
+ {
+ Properties properties = new Properties();
+ String module = getURLToTestClasses(getTestClassesPath());
+ properties.setProperty(EJBContainer.EMBEDDABLE_MODULES_PROPERTY, module);
+ this.ejbContainer = EJBContainer.createEJBContainer(properties);
+ }
+
+ @BeforeMethod
+ public void before() throws Exception
+ {
+ super.before();
+ webBeansBootstrap.getNaming().setContext(new InitialContext());
+ }
+
+ @AfterMethod
+ public void after() throws Exception
+ {
+ webBeansBootstrap.getNaming().setContext(null);
+ }
+
+
+ protected String getTestClassesPath()
+ {
+ return "org/jboss/webbeans/test";
+ }
+
+ private static String getURLToTestClasses(String path)
+ {
+ URL url = Thread.currentThread().getContextClassLoader().getResource(path);
+ String s = url.toString();
+ return s.substring(0, s.length() - path.length());
+ }
+
+ public Context getContext()
+ {
+ return webBeansBootstrap.getNaming().getContext();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractEjbEmbeddableTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java (from rev 1047, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -0,0 +1,192 @@
+package org.jboss.webbeans.test.unit;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.webbeans.Production;
+import javax.webbeans.Standard;
+
+import org.jboss.webbeans.CurrentManager;
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.bean.AbstractClassBean;
+import org.jboss.webbeans.bean.AbstractProducerBean;
+import org.jboss.webbeans.bean.EnterpriseBean;
+import org.jboss.webbeans.bean.ProducerFieldBean;
+import org.jboss.webbeans.bean.ProducerMethodBean;
+import org.jboss.webbeans.bean.SimpleBean;
+import org.jboss.webbeans.context.DependentContext;
+import org.jboss.webbeans.test.mock.MockBootstrap;
+import org.jboss.webbeans.test.mock.MockEjbDescriptor;
+import org.testng.annotations.BeforeMethod;
+
+public class AbstractTest
+{
+
+ protected abstract static class RunInDependentContext
+ {
+
+ protected void setup()
+ {
+ AbstractTest.activateDependentContext();
+ }
+
+ protected void cleanup()
+ {
+ AbstractTest.deactivateDependentContext();
+ }
+
+ 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 MockBootstrap webBeansBootstrap;
+
+ public static boolean visited = false;
+
+ @BeforeMethod
+ public void before() throws Exception
+ {
+ webBeansBootstrap = new MockBootstrap();
+ manager = webBeansBootstrap.getManager();
+ manager.setEnabledDeploymentTypes(getEnabledDeploymentTypes());
+ }
+
+ private boolean hasField(Class<?> clazz, String name)
+ {
+ try
+ {
+ Field field = clazz.getDeclaredField(name);
+ }
+ catch (NoSuchFieldException e)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ private Method getMethod(Class<?> clazz, String name)
+ {
+ for (Method method : clazz.getDeclaredMethods())
+ {
+ if (method.getName().equals(name))
+ {
+ return method;
+ }
+ }
+ return null;
+ }
+
+ protected AbstractProducerBean<?, ?> registerProducerBean(Class<?> producerBeanClass, String fieldOrMethodName, Class<?> productClass)
+ {
+ SimpleBean<?> producerContainerBean = SimpleBean.of(producerBeanClass, manager);
+ manager.addBean(producerContainerBean);
+ AbstractProducerBean<?, ?> producerBean = null;
+ try
+ {
+ if (hasField(producerBeanClass, fieldOrMethodName))
+ {
+ Field producerField = producerBeanClass.getDeclaredField(fieldOrMethodName);
+ producerBean = ProducerFieldBean.of(producerField, producerContainerBean, manager);
+ }
+ else
+ {
+ Method producerMethod = getMethod(producerBeanClass, fieldOrMethodName);
+ producerBean = ProducerMethodBean.of(producerMethod, producerContainerBean, manager);
+ }
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Could not initialize producer bean", e);
+ }
+ manager.addBean(producerBean);
+ return producerBean;
+ }
+
+
+ protected <T> AbstractClassBean<T> registerBean(Class<T> clazz)
+ {
+ AbstractClassBean<T> bean = null;
+ if (CurrentManager.rootManager().getEjbDescriptorCache().containsKey(clazz))
+ {
+ bean = EnterpriseBean.of(clazz, manager);
+ }
+ else
+ {
+ bean = SimpleBean.of(clazz, manager);
+ }
+ CurrentManager.rootManager().addBean(bean);
+ return bean;
+ }
+
+ protected void registerBeans(Class<?>[] classes)
+ {
+ for (Class<?> clazz : classes)
+ {
+ registerBean(clazz);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
+ {
+ return getDefaultDeploymentTypes();
+ }
+
+ protected final List<Class<? extends Annotation>> getDefaultDeploymentTypes()
+ {
+ return Arrays.asList(Standard.class, Production.class);
+ }
+
+ protected <T> void addToEjbCache(Class<T> clazz)
+ {
+ manager.getEjbDescriptorCache().add(MockEjbDescriptor.of(clazz));
+ }
+
+ protected byte[] serialize(Object instance) throws IOException
+ {
+ ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+ ObjectOutputStream out = new ObjectOutputStream(bytes);
+ out.writeObject(instance);
+ return bytes.toByteArray();
+ }
+
+ protected Object deserialize(byte[] bytes) throws IOException, ClassNotFoundException
+ {
+ ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes));
+ return in.readObject();
+ }
+
+ protected static void activateDependentContext()
+ {
+ DependentContext.INSTANCE.setActive(true);
+ }
+
+ protected static void deactivateDependentContext()
+ {
+ DependentContext.INSTANCE.setActive(false);
+ }
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/AbstractTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BoostrapTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BoostrapTest.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BoostrapTest.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -10,8 +10,8 @@
import org.jboss.webbeans.bean.EnterpriseBean;
import org.jboss.webbeans.bean.ProducerMethodBean;
import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.test.AbstractTest;
import org.jboss.webbeans.test.mock.MockWebBeanDiscovery;
+import org.jboss.webbeans.test.unit.AbstractTest;
import org.testng.annotations.Test;
public class BoostrapTest extends AbstractTest
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Synchronous.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Synchronous.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Synchronous.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -0,0 +1,21 @@
+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.webbeans.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Synchronous
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Synchronous.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -4,8 +4,6 @@
import javax.ejb.Stateful;
import javax.webbeans.Production;
-import org.jboss.webbeans.test.annotations.Synchronous;
-
@Production
@Stateful
@Synchronous
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -8,7 +8,7 @@
import org.jboss.webbeans.MetaDataCache;
import org.testng.annotations.Test;
-public class PassivatingContextTest extends org.jboss.webbeans.test.AbstractTest
+public class PassivatingContextTest extends org.jboss.webbeans.test.unit.AbstractTest
{
/**
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -5,11 +5,9 @@
import javax.webbeans.RequestScoped;
import org.jboss.webbeans.model.StereotypeModel;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecVersion;
+import org.jboss.webbeans.test.unit.AbstractTest;
import org.testng.annotations.Test;
-@SpecVersion("20081206")
public class StereotypesTest extends AbstractTest
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/DeferredEventNotificationTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/DeferredEventNotificationTest.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/DeferredEventNotificationTest.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -1,6 +1,8 @@
package org.jboss.webbeans.test.unit.event;
+import java.lang.annotation.Annotation;
import java.util.Arrays;
+import java.util.List;
import javax.webbeans.Observes;
import javax.webbeans.Standard;
@@ -9,7 +11,7 @@
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
import org.jboss.webbeans.introspector.jlr.AnnotatedMethodImpl;
-import org.jboss.webbeans.test.AbstractTest;
+import org.jboss.webbeans.test.unit.AbstractTest;
import org.testng.annotations.Test;
/**
@@ -28,9 +30,9 @@
}
@Override
- protected void addStandardDeploymentTypesForTests()
+ protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
{
- manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, AnotherDeploymentType.class));
+ return Arrays.asList(Standard.class, AnotherDeploymentType.class);
}
public class AnObserver
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Tuna.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Tuna.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Tuna.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -2,8 +2,6 @@
import javax.webbeans.RequestScoped;
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-
@AnotherDeploymentType
@RequestScoped
class Tuna
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -6,13 +6,11 @@
import org.jboss.webbeans.bean.EnterpriseBean;
import org.jboss.webbeans.bean.NewEnterpriseBean;
import org.jboss.webbeans.introspector.AnnotatedItem;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecVersion;
+import org.jboss.webbeans.test.unit.AbstractTest;
import org.jboss.webbeans.util.Proxies.TypeInfo;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-@SpecVersion("20081222")
public class NewEnterpriseBeanTest extends AbstractTest
{
private EnterpriseBean<WrappedEnterpriseBean> wrappedEnterpriseBean;
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -5,12 +5,10 @@
import org.jboss.webbeans.bean.NewSimpleBean;
import org.jboss.webbeans.bean.SimpleBean;
import org.jboss.webbeans.introspector.AnnotatedItem;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecVersion;
+import org.jboss.webbeans.test.unit.AbstractTest;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-@SpecVersion("20081222")
public class NewSimpleBeanTest extends AbstractTest
{
private SimpleBean<WrappedSimpleBean> wrappedSimpleBean;
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java 2009-01-17 20:10:04 UTC (rev 1048)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java 2009-01-17 20:11:52 UTC (rev 1049)
@@ -10,7 +10,7 @@
import org.jboss.webbeans.introspector.AnnotatedField;
import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
import org.jboss.webbeans.introspector.jlr.AnnotatedFieldImpl;
-import org.jboss.webbeans.test.AbstractTest;
+import org.jboss.webbeans.test.unit.AbstractTest;
import org.testng.annotations.Test;
public class ResolutionByTypeTest extends AbstractTest
17 years, 2 months
[webbeans-commits] Webbeans SVN: r1048 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-17 15:10:04 -0500 (Sat, 17 Jan 2009)
New Revision: 1048
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Tests.java
Log:
Clean up the testsuite :-)
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Tests.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Tests.java 2009-01-17 19:58:42 UTC (rev 1047)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/examples/Tests.java 2009-01-17 20:10:04 UTC (rev 1048)
@@ -9,7 +9,7 @@
import org.jboss.webbeans.bean.ProducerMethodBean;
import org.jboss.webbeans.bean.SimpleBean;
import org.jboss.webbeans.context.DependentContext;
-import org.jboss.webbeans.test.AbstractTest;
+import org.jboss.webbeans.test.unit.AbstractTest;
import org.testng.annotations.Test;
public class Tests extends AbstractTest
17 years, 2 months
[webbeans-commits] Webbeans SVN: r1047 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-01-17 14:58:42 -0500 (Sat, 17 Jan 2009)
New Revision: 1047
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java
Log:
Ported the injection point metadata tests from RI to TCK.
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java 2009-01-17 19:58:13 UTC (rev 1046)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java 2009-01-17 19:58:42 UTC (rev 1047)
@@ -1,313 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.test;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.webbeans.Current;
-import javax.webbeans.Dependent;
-import javax.webbeans.InjectionPoint;
-import javax.webbeans.Standard;
-import javax.webbeans.manager.Bean;
-
-import org.jboss.webbeans.binding.CurrentBinding;
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
-import org.jboss.webbeans.test.annotations.AnimalStereotype;
-import org.jboss.webbeans.test.beans.BeanWithInjectionPointMetadata;
-import org.jboss.webbeans.test.beans.ConstructorInjectionPointBean;
-import org.jboss.webbeans.test.beans.FieldInjectionPointBean;
-import org.jboss.webbeans.test.bindings.AnimalStereotypeAnnotationLiteral;
-import org.jboss.webbeans.test.mock.MockWebBeanDiscovery;
-import org.testng.annotations.Test;
-
-/**
- * Injection point metadata tests
- *
- * @author David Allen
- *
- */
-@SpecVersion("20081222")
-public class InjectionPointTest extends AbstractTest
-{
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetBean()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
-
- Set<Bean<FieldInjectionPointBean>> resolvedBeans = manager.resolveByType(FieldInjectionPointBean.class);
- assert resolvedBeans.size() == 1;
- assert beanWithInjectionPoint.getInjectedMetadata().getBean().equals(resolvedBeans.iterator().next());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetType()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert beanWithInjectionPoint.getInjectedMetadata().getType().equals(BeanWithInjectionPointMetadata.class);
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetBindingTypes()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- Set<Annotation> bindingTypes = beanWithInjectionPoint.getInjectedMetadata().getBindings();
- assert bindingTypes.size() == 1;
- assert Current.class.isAssignableFrom(bindingTypes.iterator().next().annotationType());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetMemberField()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert Field.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getMember().getClass());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "stub", "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetMemberMethod()
- {
- assert false;
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetMemberConstructor()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(ConstructorInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- ConstructorInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(ConstructorInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert Constructor.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getMember().getClass());
-
- // Since the type and bindings must correspond to the parameter, check them
- assert beanWithInjectionPoint.getInjectedMetadata().getType().equals(BeanWithInjectionPointMetadata.class);
- assert beanWithInjectionPoint.getInjectedMetadata().getBindings().contains(new CurrentBinding());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetAnnotation()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert beanWithInjectionPoint.getInjectedMetadata().getAnnotation(AnimalStereotype.class) != null;
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetAnnotations()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- Set<Annotation> annotations = new HashSet<Annotation>(Arrays.asList(beanWithInjectionPoint.getInjectedMetadata().getAnnotations()));
- assert annotations.size() > 0;
- assert annotations.contains(new CurrentBinding());
- assert annotations.contains(new AnimalStereotypeAnnotationLiteral());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testStandardDeployment()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert beanWithInjectionPoint.getInjectedMetadata().getClass().isAnnotationPresent(Standard.class);
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testDependentScope()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert beanWithInjectionPoint.getInjectedMetadata().getClass().isAnnotationPresent(Dependent.class);
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testApiTypeInjectionPoint()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert InjectionPoint.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getClass());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testCurrentBinding()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert beanWithInjectionPoint.getInjectedMetadata().getBindings().contains(new CurrentBinding());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-}
17 years, 2 months
[webbeans-commits] Webbeans SVN: r1046 - tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-01-17 14:58:13 -0500 (Sat, 17 Jan 2009)
New Revision: 1046
Added:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/Animal.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/AnimalStereotype.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/AnimalStereotypeAnnotationLiteral.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/BeanWithInjectionPointMetadata.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/ConstructorInjectionPointBean.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/FieldInjectionPointBean.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/InjectionPointTest.java
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java
Log:
Ported the injection point metadata tests from RI to TCK.
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java 2009-01-17 19:46:43 UTC (rev 1045)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java 2009-01-17 19:58:13 UTC (rev 1046)
@@ -1,313 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.test;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.webbeans.Current;
-import javax.webbeans.Dependent;
-import javax.webbeans.InjectionPoint;
-import javax.webbeans.Standard;
-import javax.webbeans.manager.Bean;
-
-import org.jboss.webbeans.binding.CurrentBinding;
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
-import org.jboss.webbeans.test.annotations.AnimalStereotype;
-import org.jboss.webbeans.test.beans.BeanWithInjectionPointMetadata;
-import org.jboss.webbeans.test.beans.ConstructorInjectionPointBean;
-import org.jboss.webbeans.test.beans.FieldInjectionPointBean;
-import org.jboss.webbeans.test.bindings.AnimalStereotypeAnnotationLiteral;
-import org.jboss.webbeans.test.mock.MockWebBeanDiscovery;
-import org.testng.annotations.Test;
-
-/**
- * Injection point metadata tests
- *
- * @author David Allen
- *
- */
-@SpecVersion("20081222")
-public class InjectionPointTest extends AbstractTest
-{
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetBean()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
-
- Set<Bean<FieldInjectionPointBean>> resolvedBeans = manager.resolveByType(FieldInjectionPointBean.class);
- assert resolvedBeans.size() == 1;
- assert beanWithInjectionPoint.getInjectedMetadata().getBean().equals(resolvedBeans.iterator().next());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetType()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert beanWithInjectionPoint.getInjectedMetadata().getType().equals(BeanWithInjectionPointMetadata.class);
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetBindingTypes()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- Set<Annotation> bindingTypes = beanWithInjectionPoint.getInjectedMetadata().getBindings();
- assert bindingTypes.size() == 1;
- assert Current.class.isAssignableFrom(bindingTypes.iterator().next().annotationType());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetMemberField()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert Field.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getMember().getClass());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "stub", "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetMemberMethod()
- {
- assert false;
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetMemberConstructor()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(ConstructorInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- ConstructorInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(ConstructorInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert Constructor.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getMember().getClass());
-
- // Since the type and bindings must correspond to the parameter, check them
- assert beanWithInjectionPoint.getInjectedMetadata().getType().equals(BeanWithInjectionPointMetadata.class);
- assert beanWithInjectionPoint.getInjectedMetadata().getBindings().contains(new CurrentBinding());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetAnnotation()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert beanWithInjectionPoint.getInjectedMetadata().getAnnotation(AnimalStereotype.class) != null;
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetAnnotations()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- Set<Annotation> annotations = new HashSet<Annotation>(Arrays.asList(beanWithInjectionPoint.getInjectedMetadata().getAnnotations()));
- assert annotations.size() > 0;
- assert annotations.contains(new CurrentBinding());
- assert annotations.contains(new AnimalStereotypeAnnotationLiteral());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testStandardDeployment()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert beanWithInjectionPoint.getInjectedMetadata().getClass().isAnnotationPresent(Standard.class);
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testDependentScope()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert beanWithInjectionPoint.getInjectedMetadata().getClass().isAnnotationPresent(Dependent.class);
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testApiTypeInjectionPoint()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert InjectionPoint.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getClass());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
- @Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testCurrentBinding()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
-
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- assert beanWithInjectionPoint.getInjectedMetadata().getBindings().contains(new CurrentBinding());
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-}
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java 2009-01-17 19:58:13 UTC (rev 1046)
@@ -0,0 +1,313 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.test;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.webbeans.Current;
+import javax.webbeans.Dependent;
+import javax.webbeans.InjectionPoint;
+import javax.webbeans.Standard;
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.binding.CurrentBinding;
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.test.annotations.AnimalStereotype;
+import org.jboss.webbeans.test.beans.BeanWithInjectionPointMetadata;
+import org.jboss.webbeans.test.beans.ConstructorInjectionPointBean;
+import org.jboss.webbeans.test.beans.FieldInjectionPointBean;
+import org.jboss.webbeans.test.bindings.AnimalStereotypeAnnotationLiteral;
+import org.jboss.webbeans.test.mock.MockWebBeanDiscovery;
+import org.testng.annotations.Test;
+
+/**
+ * Injection point metadata tests
+ *
+ * @author David Allen
+ *
+ */
+@SpecVersion("20081222")
+public class InjectionPointTest extends AbstractTest
+{
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetBean()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
+ webBeansBootstrap.boot();
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+
+ Set<Bean<FieldInjectionPointBean>> resolvedBeans = manager.resolveByType(FieldInjectionPointBean.class);
+ assert resolvedBeans.size() == 1;
+ assert beanWithInjectionPoint.getInjectedMetadata().getBean().equals(resolvedBeans.iterator().next());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetType()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
+ webBeansBootstrap.boot();
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert beanWithInjectionPoint.getInjectedMetadata().getType().equals(BeanWithInjectionPointMetadata.class);
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetBindingTypes()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
+ webBeansBootstrap.boot();
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ Set<Annotation> bindingTypes = beanWithInjectionPoint.getInjectedMetadata().getBindings();
+ assert bindingTypes.size() == 1;
+ assert Current.class.isAssignableFrom(bindingTypes.iterator().next().annotationType());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetMemberField()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
+ webBeansBootstrap.boot();
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert Field.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getMember().getClass());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "stub", "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetMemberMethod()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetMemberConstructor()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(ConstructorInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
+ webBeansBootstrap.boot();
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ ConstructorInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(ConstructorInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert Constructor.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getMember().getClass());
+
+ // Since the type and bindings must correspond to the parameter, check them
+ assert beanWithInjectionPoint.getInjectedMetadata().getType().equals(BeanWithInjectionPointMetadata.class);
+ assert beanWithInjectionPoint.getInjectedMetadata().getBindings().contains(new CurrentBinding());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetAnnotation()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
+ webBeansBootstrap.boot();
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert beanWithInjectionPoint.getInjectedMetadata().getAnnotation(AnimalStereotype.class) != null;
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetAnnotations()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
+ webBeansBootstrap.boot();
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ Set<Annotation> annotations = new HashSet<Annotation>(Arrays.asList(beanWithInjectionPoint.getInjectedMetadata().getAnnotations()));
+ assert annotations.size() > 0;
+ assert annotations.contains(new CurrentBinding());
+ assert annotations.contains(new AnimalStereotypeAnnotationLiteral());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testStandardDeployment()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
+ webBeansBootstrap.boot();
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert beanWithInjectionPoint.getInjectedMetadata().getClass().isAnnotationPresent(Standard.class);
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testDependentScope()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
+ webBeansBootstrap.boot();
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert beanWithInjectionPoint.getInjectedMetadata().getClass().isAnnotationPresent(Dependent.class);
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testApiTypeInjectionPoint()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
+ webBeansBootstrap.boot();
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert InjectionPoint.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getClass());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testCurrentBinding()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
+ webBeansBootstrap.boot();
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert beanWithInjectionPoint.getInjectedMetadata().getBindings().contains(new CurrentBinding());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/Animal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/Animal.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/Animal.java 2009-01-17 19:58:13 UTC (rev 1046)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.tck.tests.lookup.injectionpoint;
+
+interface Animal
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/AnimalStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/AnimalStereotype.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/AnimalStereotype.java 2009-01-17 19:58:13 UTC (rev 1046)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.tck.tests.lookup.injectionpoint;
+
+import static java.lang.annotation.ElementType.FIELD;
+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.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.RequestScoped;
+import javax.webbeans.Stereotype;
+
+(a)Stereotype(requiredTypes=Animal.class)
+@Target( { TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@RequestScoped
+@interface AnimalStereotype
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/AnimalStereotype.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/AnimalStereotypeAnnotationLiteral.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/AnimalStereotypeAnnotationLiteral.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/AnimalStereotypeAnnotationLiteral.java 2009-01-17 19:58:13 UTC (rev 1046)
@@ -0,0 +1,8 @@
+package org.jboss.webbeans.tck.tests.lookup.injectionpoint;
+
+import javax.webbeans.AnnotationLiteral;
+
+class AnimalStereotypeAnnotationLiteral extends AnnotationLiteral<AnimalStereotype> implements AnimalStereotype
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/AnimalStereotypeAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/BeanWithInjectionPointMetadata.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/BeanWithInjectionPointMetadata.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/BeanWithInjectionPointMetadata.java 2009-01-17 19:58:13 UTC (rev 1046)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.tck.tests.lookup.injectionpoint;
+
+import javax.webbeans.Current;
+import javax.webbeans.InjectionPoint;
+
+/**
+ * Test bean with injection point on the constructor of the bean
+ *
+ * @author David Allen
+ *
+ */
+class BeanWithInjectionPointMetadata
+{
+ @Current
+ private InjectionPoint injectedMetadata;
+
+ public InjectionPoint getInjectedMetadata()
+ {
+ return injectedMetadata;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/BeanWithInjectionPointMetadata.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/ConstructorInjectionPointBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/ConstructorInjectionPointBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/ConstructorInjectionPointBean.java 2009-01-17 19:58:13 UTC (rev 1046)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.tck.tests.lookup.injectionpoint;
+
+import javax.webbeans.Current;
+import javax.webbeans.Initializer;
+
+/**
+ * Test bean to inject a bean using injection point metadata into a constructor
+ *
+ * @author David Allen
+ *
+ */
+class ConstructorInjectionPointBean
+{
+ private BeanWithInjectionPointMetadata injectedBean;
+
+ @Initializer
+ public ConstructorInjectionPointBean(@Current BeanWithInjectionPointMetadata injectedBean)
+ {
+ this.injectedBean = injectedBean;
+ }
+
+ public BeanWithInjectionPointMetadata getInjectedBean()
+ {
+ return injectedBean;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/ConstructorInjectionPointBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/FieldInjectionPointBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/FieldInjectionPointBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/FieldInjectionPointBean.java 2009-01-17 19:58:13 UTC (rev 1046)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.tck.tests.lookup.injectionpoint;
+
+import javax.webbeans.Current;
+import javax.webbeans.RequestScoped;
+
+/**
+ * Test bean to inject another bean which uses injection point metadata in a
+ * field
+ *
+ * @author David Allen
+ *
+ */
+@RequestScoped
+class FieldInjectionPointBean
+{
+ @Current @AnimalStereotype
+ private BeanWithInjectionPointMetadata injectedBean;
+
+ public BeanWithInjectionPointMetadata getInjectedBean()
+ {
+ return injectedBean;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/FieldInjectionPointBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/InjectionPointTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/InjectionPointTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/InjectionPointTest.java 2009-01-17 19:58:13 UTC (rev 1046)
@@ -0,0 +1,298 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.tck.tests.lookup.injectionpoint;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.webbeans.Current;
+import javax.webbeans.Dependent;
+import javax.webbeans.InjectionPoint;
+import javax.webbeans.Standard;
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.impl.literals.CurrentBinding;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+/**
+ * Injection point metadata tests
+ *
+ * @author David Allen
+ *
+ */
+@SpecVersion("20081222")
+public class InjectionPointTest extends AbstractTest
+{
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetBean()
+ {
+ deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+
+ Set<Bean<FieldInjectionPointBean>> resolvedBeans = manager.resolveByType(FieldInjectionPointBean.class);
+ assert resolvedBeans.size() == 1;
+ assert beanWithInjectionPoint.getInjectedMetadata().getBean().equals(resolvedBeans.iterator().next());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetType()
+ {
+ deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert beanWithInjectionPoint.getInjectedMetadata().getType().equals(BeanWithInjectionPointMetadata.class);
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetBindingTypes()
+ {
+ deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ Set<Annotation> bindingTypes = beanWithInjectionPoint.getInjectedMetadata().getBindings();
+ assert bindingTypes.size() == 1;
+ assert Current.class.isAssignableFrom(bindingTypes.iterator().next().annotationType());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetMemberField()
+ {
+ deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert Field.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getMember().getClass());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "stub", "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetMemberMethod()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetMemberConstructor()
+ {
+ deployBeans(ConstructorInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ ConstructorInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(ConstructorInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert Constructor.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getMember().getClass());
+
+ // Since the type and bindings must correspond to the parameter, check
+ // them
+ assert beanWithInjectionPoint.getInjectedMetadata().getType().equals(BeanWithInjectionPointMetadata.class);
+ assert beanWithInjectionPoint.getInjectedMetadata().getBindings().contains(new CurrentBinding());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetAnnotation()
+ {
+ deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert beanWithInjectionPoint.getInjectedMetadata().getAnnotation(AnimalStereotype.class) != null;
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testGetAnnotations()
+ {
+ deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ Set<Annotation> annotations = new HashSet<Annotation>(Arrays.asList(beanWithInjectionPoint.getInjectedMetadata().getAnnotations()));
+ assert annotations.size() > 0;
+ assert annotations.contains(new CurrentBinding());
+ assert annotations.contains(new AnimalStereotypeAnnotationLiteral());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testStandardDeployment()
+ {
+ deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert beanWithInjectionPoint.getInjectedMetadata().getClass().isAnnotationPresent(Standard.class);
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testDependentScope()
+ {
+ deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert beanWithInjectionPoint.getInjectedMetadata().getClass().isAnnotationPresent(Dependent.class);
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testApiTypeInjectionPoint()
+ {
+ deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert InjectionPoint.class.isAssignableFrom(beanWithInjectionPoint.getInjectedMetadata().getClass());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+
+ @Test(groups = { "injectionPoint" })
+ @SpecAssertion(section = "5.11")
+ public void testCurrentBinding()
+ {
+ deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
+
+ // Get an instance of the bean which has another bean injected into it
+ try
+ {
+ activateDependentContext();
+ FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
+ BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
+ assert beanWithInjectionPoint.getInjectedMetadata() != null;
+ assert beanWithInjectionPoint.getInjectedMetadata().getBindings().contains(new CurrentBinding());
+ }
+ finally
+ {
+ deactivateDependentContext();
+ }
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/lookup/injectionpoint/InjectionPointTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 2 months
[webbeans-commits] Webbeans SVN: r1045 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test and 12 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-17 14:46:43 -0500 (Sat, 17 Jan 2009)
New Revision: 1045
Added:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/AnotherDeploymentType.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BoostrapTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlyAnimal.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlySpider.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DefangedTarantula.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Elephant.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Hound.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserver.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesApplicationContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/LadybirdSpider.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Panther.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Salmon.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ScottishFish.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/SeaBass.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Sole.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Spider.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tame.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tarantula.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/TarantulaProducer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tuna.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Whitefish.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/context/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/Animal.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalOrderStereotype.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalStereotype.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/Order.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/RequestScopedAnimalStereotype.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/AnotherDeploymentType.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Asynchronous.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/DeferredEventNotificationTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Tuna.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Animal.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Antelope.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Order.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedSimpleBean.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Animal.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/AnotherDeploymentType.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Chunky.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Cod.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Expensive.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Farmer.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/FishFarm.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Haddock.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Salmon.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ScottishFish.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/SeaBass.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Sole.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Tuna.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Whitefish.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/commonAnnotations/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/commonAnnotations/ResourceInjectionTest.java
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/invalid/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/contexts/valid/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/invalid/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/integration/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/newbean/invalid/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/newbean/valid/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/resource/
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/BoostrapTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/ClassAnnotatedItemTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/DeferredEventNotificationTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/NewEnterpriseBeanTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/NewSimpleBeanTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/PassivatingContextTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/ResolutionByTypeTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/StereotypesTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/util/
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java
ri/trunk/webbeans-ri/unit-tests.xml
Log:
move unit tests to own packages with beans
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java 2009-01-17 19:12:36 UTC (rev 1044)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -30,6 +30,8 @@
import javax.webbeans.manager.Bean;
import org.jboss.webbeans.binding.CurrentBinding;
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.test.annotations.AnimalStereotype;
import org.jboss.webbeans.test.beans.BeanWithInjectionPointMetadata;
import org.jboss.webbeans.test.beans.ConstructorInjectionPointBean;
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/BoostrapTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/BoostrapTest.java 2009-01-17 19:12:36 UTC (rev 1044)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/BoostrapTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -1,288 +0,0 @@
-package org.jboss.webbeans.test.unit;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.webbeans.manager.Bean;
-
-import org.jboss.webbeans.bean.AbstractBean;
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.bean.ProducerMethodBean;
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.beans.Elephant;
-import org.jboss.webbeans.test.beans.InitializedObserver;
-import org.jboss.webbeans.test.beans.InitializedObserverWhichUsesApplicationContext;
-import org.jboss.webbeans.test.beans.InitializedObserverWhichUsesRequestContext;
-import org.jboss.webbeans.test.beans.LadybirdSpider;
-import org.jboss.webbeans.test.beans.Panther;
-import org.jboss.webbeans.test.beans.Salmon;
-import org.jboss.webbeans.test.beans.SeaBass;
-import org.jboss.webbeans.test.beans.Sole;
-import org.jboss.webbeans.test.beans.Tarantula;
-import org.jboss.webbeans.test.beans.TarantulaProducer;
-import org.jboss.webbeans.test.beans.Tiger;
-import org.jboss.webbeans.test.beans.Tuna;
-import org.jboss.webbeans.test.ejb.valid.Hound;
-import org.jboss.webbeans.test.mock.MockWebBeanDiscovery;
-import org.testng.annotations.Test;
-
-public class BoostrapTest extends AbstractTest
-{
- @Test(groups="bootstrap")
- public void testSingleSimpleBean()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Tuna.class));
- webBeansBootstrap.boot();
- List<Bean<?>> beans = manager.getBeans();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
- for (Bean<?> bean : beans)
- {
- if (bean instanceof AbstractBean)
- {
- classes.put(((AbstractBean<?, ?>) bean).getType(), bean);
- }
- }
- assert classes.containsKey(Tuna.class);
- }
-
- @Test(groups="bootstrap")
- public void testSingleEnterpriseBean()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class));
- webBeansBootstrap.boot();
- List<Bean<?>> beans = manager.getBeans();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
- for (Bean<?> bean : beans)
- {
- if (bean instanceof AbstractBean)
- {
- classes.put(((AbstractBean<?, ?>) bean).getType(), bean);
- }
- }
- assert classes.containsKey(Hound.class);
- }
-
- @Test(groups="bootstrap")
- public void testMultipleSimpleBean()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Tuna.class, Salmon.class, SeaBass.class, Sole.class));
- webBeansBootstrap.boot();
- List<Bean<?>> beans = manager.getBeans();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
- for (Bean<?> bean : beans)
- {
- if (bean instanceof AbstractBean)
- {
- classes.put(((AbstractBean<?, ?>) 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()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(TarantulaProducer.class));
- webBeansBootstrap.boot();
- List<Bean<?>> beans = manager.getBeans();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
- for (Bean<?> bean : beans)
- {
- if (bean instanceof AbstractBean)
- {
- classes.put(((AbstractBean<?, ?>) 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()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class));
- webBeansBootstrap.boot();
- List<Bean<?>> beans = manager.getBeans();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
- for (Bean<?> bean : beans)
- {
- if (bean instanceof AbstractBean)
- {
- classes.put(((AbstractBean<?, ?>) 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()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class));
- webBeansBootstrap.boot();
- List<Bean<?>> beans = manager.getBeans();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
- for (Bean<?> bean : beans)
- {
- if (bean instanceof AbstractBean)
- {
- classes.put(((AbstractBean<?, ?>) 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()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(TarantulaProducer.class));
- webBeansBootstrap.boot();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
- for (Bean<?> bean : manager.getBeans())
- {
- if (bean instanceof AbstractBean)
- {
- classes.put(((AbstractBean<?, ?>) 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()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class));
- webBeansBootstrap.boot();
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
- for (Bean<?> bean : manager.getBeans())
- {
- if (bean instanceof AbstractBean)
- {
- classes.put(((AbstractBean<?, ?>) 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()
- {
- webBeansBootstrap.setWebBeanDiscovery(null);
- webBeansBootstrap.boot();
- }
-
- @Test(groups="bootstrap")
- public void testDiscover()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class));
- webBeansBootstrap.boot();
-
- Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
- for (Bean<?> bean : manager.getBeans())
- {
- if (bean instanceof AbstractBean)
- {
- classes.put(((AbstractBean<?, ?>) 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;
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(InitializedObserver.class));
- webBeansBootstrap.boot();
-
- assert InitializedObserver.observered;
- }
-
- @Test(groups="bootstrap")
- public void testRequestContextActiveDuringInitializtionEvent()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(InitializedObserverWhichUsesRequestContext.class, Tuna.class));
- webBeansBootstrap.boot();
- }
-
- @Test(groups={"bootstrap", "broken"})
- public void testApplicationContextActiveDuringInitializtionEvent()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(InitializedObserverWhichUsesApplicationContext.class, LadybirdSpider.class));
- webBeansBootstrap.boot();
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/ClassAnnotatedItemTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/ClassAnnotatedItemTest.java 2009-01-17 19:12:36 UTC (rev 1044)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/ClassAnnotatedItemTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -1,50 +0,0 @@
-package org.jboss.webbeans.test.unit;
-
-import java.lang.annotation.Annotation;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.webbeans.DeploymentType;
-import javax.webbeans.Production;
-import javax.webbeans.Stereotype;
-
-import org.jboss.webbeans.introspector.AnnotatedClass;
-import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
-import org.jboss.webbeans.test.beans.Antelope;
-import org.jboss.webbeans.test.beans.Order;
-import org.testng.annotations.Test;
-
-public class ClassAnnotatedItemTest
-{
-
- @Test
- public void testDeclaredAnnotations()
- {
- AnnotatedClass<Order> annotatedElement = new AnnotatedClassImpl<Order>(Order.class);
- assert annotatedElement.getAnnotations().size() == 1;
- assert annotatedElement.getAnnotation(Production.class) != null;
- assert annotatedElement.getType().equals(Order.class);
- }
-
- @Test
- public void testMetaAnnotations()
- {
- AnnotatedClass<Order> annotatedElement = new AnnotatedClassImpl<Order>(Order.class);
- Set<Annotation> annotations = annotatedElement.getMetaAnnotations(DeploymentType.class);
- assert annotations.size() == 1;
- Iterator<Annotation> it = annotations.iterator();
- Annotation production = it.next();
- assert Production.class.equals(production.annotationType());
- }
-
- @Test
- public void testEmpty()
- {
- AnnotatedClass<Order> annotatedElement = new AnnotatedClassImpl<Order>(Order.class);
- assert annotatedElement.getAnnotation(Stereotype.class) == null;
- assert annotatedElement.getMetaAnnotations(Stereotype.class).size() == 0;
- AnnotatedClass<Antelope> classWithNoAnnotations = new AnnotatedClassImpl<Antelope>(Antelope.class);
- assert classWithNoAnnotations.getAnnotations().size() == 0;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/DeferredEventNotificationTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/DeferredEventNotificationTest.java 2009-01-17 19:12:36 UTC (rev 1044)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/DeferredEventNotificationTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -1,82 +0,0 @@
-package org.jboss.webbeans.test.unit;
-
-import java.util.Arrays;
-
-import javax.webbeans.Observes;
-import javax.webbeans.Standard;
-
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.introspector.AnnotatedMethod;
-import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
-import org.jboss.webbeans.introspector.jlr.AnnotatedMethodImpl;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-import org.jboss.webbeans.test.annotations.Asynchronous;
-import org.jboss.webbeans.test.beans.Tuna;
-import org.testng.annotations.Test;
-
-/**
- * Unit tests for the deferred event notification object used to delay
- * notification till the end of a transaction.
- *
- * @author David Allen
- *
- */
-public class DeferredEventNotificationTest extends AbstractTest
-{
-
- public class Event
- {
- // Simple class used for testing
- }
-
- @Override
- protected void addStandardDeploymentTypesForTests()
- {
- manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, AnotherDeploymentType.class));
- }
-
- public class AnObserver
- {
- protected boolean notified = false;
-
- public void observe(@Observes @Asynchronous Event e)
- {
- // An observer method
- this.notified = true;
- }
- }
-
- /**
- * Test method for
- * {@link org.jboss.webbeans.event.DeferredEventNotification#beforeCompletion()}
- * .
- */
- @Test(groups={"deferredEvent", "broken"})
- public final void testBeforeCompletion() throws Exception
- {
- // When the transaction is committed, the beforeCompletion() method is
- // invoked which in turn invokes the observer. Here the mock observer
- // is used to keep track of the event being fired.
- SimpleBean<Tuna> tuna;
- AnnotatedMethod<Object> om;
-
-
- // Create an observer with known binding types
- //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- //annotations.put(Asynchronous.class, new AsynchronousAnnotationLiteral());
- //AnnotatedClass<Tuna> annotatedItem = new SimpleAnnotatedClass<Tuna>(Tuna.class, annotations);
- // TODO This should test a real class
- tuna = SimpleBean.of(Tuna.class, manager);
- om = new AnnotatedMethodImpl<Object>(AnObserver.class.getMethod("observe", new Class[] { Event.class }), new AnnotatedClassImpl<AnObserver>(AnObserver.class));
-
- AnObserver observerInstance = new AnObserver();
- // TODO Fix this Observer<Event> observer = new MockObserverImpl<Event>(tuna, om, Event.class);
- //((MockObserverImpl<Event>) observer).setInstance(observerInstance);
- Event event = new Event();
- //DeferredEventNotification<Event> deferredNotification = new DeferredEventNotification<Event>(event, observer);
- //deferredNotification.beforeCompletion();
- assert observerInstance.notified;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/NewEnterpriseBeanTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/NewEnterpriseBeanTest.java 2009-01-17 19:12:36 UTC (rev 1044)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/NewEnterpriseBeanTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -1,66 +0,0 @@
-package org.jboss.webbeans.test.unit;
-
-import java.lang.annotation.Annotation;
-import java.util.Set;
-
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.bean.NewEnterpriseBean;
-import org.jboss.webbeans.introspector.AnnotatedItem;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.newbean.valid.WrappedEnterpriseBean;
-import org.jboss.webbeans.test.newbean.valid.WrappedSimpleBean;
-import org.jboss.webbeans.util.Proxies.TypeInfo;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-@SpecVersion("20081222")
-public class NewEnterpriseBeanTest extends AbstractTest
-{
- private EnterpriseBean<WrappedEnterpriseBean> wrappedEnterpriseBean;
- private NewEnterpriseBean<WrappedEnterpriseBean> newEnterpriseBean;
-
- @BeforeMethod
- public void initNewBean() {
- addToEjbCache(WrappedEnterpriseBean.class);
- wrappedEnterpriseBean = EnterpriseBean.of(WrappedEnterpriseBean.class, manager);
- manager.addBean(wrappedEnterpriseBean);
- newEnterpriseBean = NewEnterpriseBean.of(WrappedEnterpriseBean.class, manager);
- manager.addBean(newEnterpriseBean);
- }
-
- @Test(groups = { "new", "broken" })
- public void testNewBeanHasImplementationClassOfInjectionPointType()
- {
- assert newEnterpriseBean.getType().equals(WrappedSimpleBean.class);
- }
-
- @Test(groups = { "new" })
- public void testNewBeanIsEnterpriseWebBeanIfParameterTypeIsEnterpriseWebBean()
- {
- assert wrappedEnterpriseBean.getType().equals(newEnterpriseBean.getType());
- assert manager.getEjbDescriptorCache().containsKey(newEnterpriseBean.getType());
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
- {
- assert newEnterpriseBean.getInitializerMethods().equals(wrappedEnterpriseBean.getInitializerMethods());
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
- {
- Set<AnnotatedItem<?, ?>> wrappedBeanInjectionPoints = wrappedEnterpriseBean.getAnnotatedInjectionPoints();
- Set<AnnotatedItem<?, ?>> newBeanInjectionPoints = newEnterpriseBean.getAnnotatedInjectionPoints();
- assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasNoDisposalMethods()
- {
- Class<?> type = TypeInfo.ofTypes(newEnterpriseBean.getTypes()).getSuperClass();
- assert manager.resolveDisposalMethods(type, newEnterpriseBean.getBindings().toArray(new Annotation[0])).isEmpty();
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/NewSimpleBeanTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/NewSimpleBeanTest.java 2009-01-17 19:12:36 UTC (rev 1044)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/NewSimpleBeanTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -1,60 +0,0 @@
-package org.jboss.webbeans.test.unit;
-
-import java.util.Set;
-
-import org.jboss.webbeans.bean.NewSimpleBean;
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.introspector.AnnotatedItem;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.newbean.valid.WrappedSimpleBean;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-@SpecVersion("20081222")
-public class NewSimpleBeanTest extends AbstractTest
-{
- private SimpleBean<WrappedSimpleBean> wrappedSimpleBean;
- private NewSimpleBean<WrappedSimpleBean> newSimpleBean;
-
- @BeforeMethod
- public void initNewBean() {
- wrappedSimpleBean = SimpleBean.of(WrappedSimpleBean.class, manager);
- manager.addBean(wrappedSimpleBean);
- newSimpleBean = NewSimpleBean.of(WrappedSimpleBean.class, manager);
- manager.addBean(newSimpleBean);
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasImplementationClassOfInjectionPointType()
- {
- assert newSimpleBean.getType().equals(WrappedSimpleBean.class);
- }
-
- @Test(groups = { "new" })
- public void testNewBeanIsSimpleWebBeanIfParameterTypeIsSimpleWebBean()
- {
- assert newSimpleBean.getType().equals(wrappedSimpleBean.getType());
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasSameConstructorAsWrappedBean()
- {
- assert wrappedSimpleBean.getConstructor().equals(newSimpleBean.getConstructor());
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
- {
- assert newSimpleBean.getInitializerMethods().equals(wrappedSimpleBean.getInitializerMethods());
- }
-
- @Test(groups = { "new" })
- public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
- {
- Set<AnnotatedItem<?, ?>> wrappedBeanInjectionPoints = wrappedSimpleBean.getAnnotatedInjectionPoints();
- Set<AnnotatedItem<?, ?>> newBeanInjectionPoints = newSimpleBean.getAnnotatedInjectionPoints();
- assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/PassivatingContextTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/PassivatingContextTest.java 2009-01-17 19:12:36 UTC (rev 1044)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/PassivatingContextTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -1,54 +0,0 @@
-package org.jboss.webbeans.test.unit;
-
-import javax.webbeans.ApplicationScoped;
-import javax.webbeans.ConversationScoped;
-import javax.webbeans.RequestScoped;
-import javax.webbeans.SessionScoped;
-
-import org.jboss.webbeans.MetaDataCache;
-import org.testng.annotations.Test;
-
-public class PassivatingContextTest extends org.jboss.webbeans.test.AbstractTest
-{
-
- /**
- * The built-in session and conversation scopes are passivating. No other
- * built-in scope is passivating.
- */
- @Test(groups = { "contexts", "passivation" })
- public void testIsSessionScopePassivating()
- {
- assert MetaDataCache.instance().getScopeModel(SessionScoped.class).isPassivating();
- }
-
- /**
- * The built-in session and conversation scopes are passivating. No other
- * built-in scope is passivating.
- */
- @Test(groups = { "contexts", "passivation" })
- public void testIsConversationScopePassivating()
- {
- assert MetaDataCache.instance().getScopeModel(ConversationScoped.class).isPassivating();
- }
-
- /**
- * The built-in session and conversation scopes are passivating. No other
- * built-in scope is passivating.
- */
- @Test(groups = { "contexts", "passivation" })
- public void testIsApplicationScopeNonPassivating()
- {
- assert !MetaDataCache.instance().getScopeModel(ApplicationScoped.class).isPassivating();
- }
-
- /**
- * The built-in session and conversation scopes are passivating. No other
- * built-in scope is passivating.
- */
- @Test(groups = { "contexts", "passivation" })
- public void testIsRequestScopeNonPassivating()
- {
- assert !MetaDataCache.instance().getScopeModel(RequestScoped.class).isPassivating();
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/ResolutionByTypeTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/ResolutionByTypeTest.java 2009-01-17 19:12:36 UTC (rev 1044)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/ResolutionByTypeTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -1,89 +0,0 @@
-package org.jboss.webbeans.test.unit;
-
-import java.util.Set;
-
-import javax.webbeans.manager.Bean;
-
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.binding.CurrentBinding;
-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.test.AbstractTest;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.beans.Animal;
-import org.jboss.webbeans.test.beans.Cod;
-import org.jboss.webbeans.test.beans.FishFarm;
-import org.jboss.webbeans.test.beans.Haddock;
-import org.jboss.webbeans.test.beans.Salmon;
-import org.jboss.webbeans.test.beans.ScottishFish;
-import org.jboss.webbeans.test.beans.SeaBass;
-import org.jboss.webbeans.test.beans.Sole;
-import org.jboss.webbeans.test.beans.Tuna;
-import org.testng.annotations.Test;
-
-@SpecVersion("20081206")
-public class ResolutionByTypeTest extends AbstractTest
-{
-
- private AnnotatedClass<FishFarm> fishFarmClass = new AnnotatedClassImpl<FishFarm>(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.getBindingTypes().size() == 1;
- assert tuna.getBindingTypes().contains(new CurrentBinding());
- assert tuna.getType().isAssignableFrom(Tuna.class);
- }
-
- @Test
- public void testOneBindingType() 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 testABindingType() 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/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/StereotypesTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/StereotypesTest.java 2009-01-17 19:12:36 UTC (rev 1044)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/StereotypesTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -1,62 +0,0 @@
-package org.jboss.webbeans.test.unit;
-
-import java.util.Arrays;
-
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.model.StereotypeModel;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.annotations.AnimalOrderStereotype;
-import org.jboss.webbeans.test.annotations.AnimalStereotype;
-import org.jboss.webbeans.test.annotations.RequestScopedAnimalStereotype;
-import org.jboss.webbeans.test.beans.Animal;
-import org.jboss.webbeans.test.beans.Order;
-import org.testng.annotations.Test;
-
-@SpecVersion("20081206")
-public class StereotypesTest extends AbstractTest
-{
-
- @Test
- public void testAnimalStereotype()
- {
- StereotypeModel<AnimalStereotype> animalStereotype = new StereotypeModel<AnimalStereotype>(AnimalStereotype.class);
- assert animalStereotype.getDefaultScopeType().annotationType().equals(RequestScoped.class);
- assert animalStereotype.getInterceptorBindings().size() == 0;
- assert animalStereotype.getRequiredTypes().size() == 1;
- assert animalStereotype.getRequiredTypes().contains(Animal.class);
- assert animalStereotype.getSupportedScopes().size() == 0;
- assert !animalStereotype.isBeanNameDefaulted();
- assert animalStereotype.getDefaultDeploymentType() == null;
- }
-
- @Test
- public void testAnimalOrderStereotype()
- {
- StereotypeModel<AnimalOrderStereotype> animalStereotype = new StereotypeModel<AnimalOrderStereotype>(AnimalOrderStereotype.class);
- assert animalStereotype.getDefaultScopeType() == null;
- assert animalStereotype.getInterceptorBindings().size() == 0;
- assert animalStereotype.getRequiredTypes().size() == 2;
- Class<?> [] requiredTypes = {Animal.class, Order.class};
- assert animalStereotype.getRequiredTypes().containsAll(Arrays.asList(requiredTypes));
- assert animalStereotype.getSupportedScopes().size() == 0;
- assert !animalStereotype.isBeanNameDefaulted();
- assert animalStereotype.getDefaultDeploymentType() == null;
- }
-
- @Test
- public void testRequestScopedAnimalStereotype()
- {
- StereotypeModel<RequestScopedAnimalStereotype> animalStereotype = new StereotypeModel<RequestScopedAnimalStereotype>(RequestScopedAnimalStereotype.class);
- assert animalStereotype.getDefaultScopeType() == null;
- assert animalStereotype.getInterceptorBindings().size() == 0;
- assert animalStereotype.getRequiredTypes().size() == 1;
- assert Animal.class.equals(animalStereotype.getRequiredTypes().iterator().next());
- assert animalStereotype.getSupportedScopes().size() == 1;
- assert animalStereotype.getSupportedScopes().contains(RequestScoped.class);
- assert !animalStereotype.isBeanNameDefaulted();
- assert animalStereotype.getDefaultDeploymentType() == null;
- }
-
-}
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+interface Animal
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/AnotherDeploymentType.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/AnotherDeploymentType.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/AnotherDeploymentType.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+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.webbeans.DeploymentType;
+
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+@interface AnotherDeploymentType
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/AnotherDeploymentType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BoostrapTest.java (from rev 1036, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/BoostrapTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BoostrapTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BoostrapTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,274 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.bean.AbstractBean;
+import org.jboss.webbeans.bean.EnterpriseBean;
+import org.jboss.webbeans.bean.ProducerMethodBean;
+import org.jboss.webbeans.bean.SimpleBean;
+import org.jboss.webbeans.test.AbstractTest;
+import org.jboss.webbeans.test.mock.MockWebBeanDiscovery;
+import org.testng.annotations.Test;
+
+public class BoostrapTest extends AbstractTest
+{
+ @Test(groups="bootstrap")
+ public void testSingleSimpleBean()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Tuna.class));
+ webBeansBootstrap.boot();
+ List<Bean<?>> beans = manager.getBeans();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof AbstractBean)
+ {
+ classes.put(((AbstractBean<?, ?>) bean).getType(), bean);
+ }
+ }
+ assert classes.containsKey(Tuna.class);
+ }
+
+ @Test(groups="bootstrap")
+ public void testSingleEnterpriseBean()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class));
+ webBeansBootstrap.boot();
+ List<Bean<?>> beans = manager.getBeans();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof AbstractBean)
+ {
+ classes.put(((AbstractBean<?, ?>) bean).getType(), bean);
+ }
+ }
+ assert classes.containsKey(Hound.class);
+ }
+
+ @Test(groups="bootstrap")
+ public void testMultipleSimpleBean()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Tuna.class, Salmon.class, SeaBass.class, Sole.class));
+ webBeansBootstrap.boot();
+ List<Bean<?>> beans = manager.getBeans();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof AbstractBean)
+ {
+ classes.put(((AbstractBean<?, ?>) 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()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(TarantulaProducer.class));
+ webBeansBootstrap.boot();
+ List<Bean<?>> beans = manager.getBeans();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof AbstractBean)
+ {
+ classes.put(((AbstractBean<?, ?>) 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()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class));
+ webBeansBootstrap.boot();
+ List<Bean<?>> beans = manager.getBeans();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof AbstractBean)
+ {
+ classes.put(((AbstractBean<?, ?>) 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()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class));
+ webBeansBootstrap.boot();
+ List<Bean<?>> beans = manager.getBeans();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
+ for (Bean<?> bean : beans)
+ {
+ if (bean instanceof AbstractBean)
+ {
+ classes.put(((AbstractBean<?, ?>) 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()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(TarantulaProducer.class));
+ webBeansBootstrap.boot();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
+ for (Bean<?> bean : manager.getBeans())
+ {
+ if (bean instanceof AbstractBean)
+ {
+ classes.put(((AbstractBean<?, ?>) 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()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class));
+ webBeansBootstrap.boot();
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
+ for (Bean<?> bean : manager.getBeans())
+ {
+ if (bean instanceof AbstractBean)
+ {
+ classes.put(((AbstractBean<?, ?>) 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()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(null);
+ webBeansBootstrap.boot();
+ }
+
+ @Test(groups="bootstrap")
+ public void testDiscover()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class));
+ webBeansBootstrap.boot();
+
+ Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
+ for (Bean<?> bean : manager.getBeans())
+ {
+ if (bean instanceof AbstractBean)
+ {
+ classes.put(((AbstractBean<?, ?>) 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;
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(InitializedObserver.class));
+ webBeansBootstrap.boot();
+
+ assert InitializedObserver.observered;
+ }
+
+ @Test(groups="bootstrap")
+ public void testRequestContextActiveDuringInitializtionEvent()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(InitializedObserverWhichUsesRequestContext.class, Tuna.class));
+ webBeansBootstrap.boot();
+ }
+
+ @Test(groups={"bootstrap", "broken"})
+ public void testApplicationContextActiveDuringInitializtionEvent()
+ {
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(InitializedObserverWhichUsesApplicationContext.class, LadybirdSpider.class));
+ webBeansBootstrap.boot();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/BoostrapTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlyAnimal.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlyAnimal.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlyAnimal.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+interface DeadlyAnimal
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlyAnimal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlySpider.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlySpider.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlySpider.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+interface DeadlySpider extends DeadlyAnimal
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DeadlySpider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DefangedTarantula.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DefangedTarantula.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DefangedTarantula.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+class DefangedTarantula extends Tarantula
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/DefangedTarantula.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Elephant.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Elephant.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Elephant.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,25 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Destructor;
+import javax.webbeans.Production;
+
+@Production
+@Stateful
+class Elephant
+{
+
+ @Remove
+ public void remove1()
+ {
+
+ }
+
+ @Remove @Destructor
+ public void remove2()
+ {
+
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Elephant.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Hound.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Hound.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Hound.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Named;
+
+@Stateful
+@Tame
+@Named("Pongo")
+class Hound
+{
+ @Remove
+ public void bye() {
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Hound.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserver.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserver.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserver.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.webbeans.Observes;
+import javax.webbeans.manager.Initialized;
+import javax.webbeans.manager.Manager;
+
+class InitializedObserver
+{
+
+ public static boolean observered;
+
+ public void observeInitialized(@Observes @Initialized Manager manager)
+ {
+ observered = true;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserver.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesApplicationContext.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesApplicationContext.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesApplicationContext.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.webbeans.Current;
+import javax.webbeans.Observes;
+import javax.webbeans.manager.Initialized;
+import javax.webbeans.manager.Manager;
+
+class InitializedObserverWhichUsesApplicationContext
+{
+
+ @Current LadybirdSpider spider;
+
+ public void observeInitialized(@Observes @Initialized Manager manager)
+ {
+ spider.spinWeb();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesApplicationContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.webbeans.Current;
+import javax.webbeans.Observes;
+import javax.webbeans.manager.Initialized;
+import javax.webbeans.manager.Manager;
+
+class InitializedObserverWhichUsesRequestContext
+{
+
+ @Current Tuna tuna;
+
+ public void observeInitialized(@Observes @Initialized Manager manager)
+ {
+ tuna.getName();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/InitializedObserverWhichUsesRequestContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/LadybirdSpider.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/LadybirdSpider.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/LadybirdSpider.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.webbeans.ApplicationScoped;
+
+@ApplicationScoped
+class LadybirdSpider extends Spider
+{
+
+ public void spinWeb()
+ {
+
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/LadybirdSpider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Panther.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Panther.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Panther.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Production;
+
+@Production
+@Stateful
+class Panther
+{
+
+ @Remove
+ public void remove(String foo)
+ {
+
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Panther.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Salmon.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Salmon.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Salmon.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.webbeans.Named;
+import javax.webbeans.Production;
+
+@Production
+@Named
+class Salmon implements ScottishFish
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Salmon.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ScottishFish.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ScottishFish.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ScottishFish.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+interface ScottishFish extends Animal
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/ScottishFish.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/SeaBass.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/SeaBass.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/SeaBass.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.webbeans.Production;
+import javax.webbeans.RequestScoped;
+
+@Production
+@RequestScoped
+class SeaBass implements Animal
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/SeaBass.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Sole.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Sole.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Sole.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.webbeans.Named;
+import javax.webbeans.Production;
+
+@Production
+@Whitefish
+@Named("whitefish")
+class Sole implements ScottishFish
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Sole.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Spider.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Spider.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Spider.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+class Spider implements Animal
+{
+
+ public final void layEggs()
+ {
+
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Spider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tame.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tame.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tame.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,22 @@
+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.webbeans.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Tame
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tame.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tarantula.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tarantula.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tarantula.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+class Tarantula extends Spider implements DeadlySpider
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tarantula.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/TarantulaProducer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/TarantulaProducer.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/TarantulaProducer.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,13 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.webbeans.Produces;
+
+public class TarantulaProducer
+{
+
+ @Produces @Tame public Tarantula produceTameTarantula()
+ {
+ return new DefangedTarantula();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/TarantulaProducer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Production;
+
+import org.jboss.webbeans.test.annotations.Synchronous;
+
+@Production
+@Stateful
+@Synchronous
+public class Tiger
+{
+
+ @Remove
+ public void remove()
+ {
+
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tiger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tuna.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tuna.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tuna.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.test.unit.bootstrap;
+
+import javax.webbeans.RequestScoped;
+
+@RequestScoped
+class Tuna
+{
+
+ public String getName()
+ {
+ return "Ophir";
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Tuna.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Whitefish.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Whitefish.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Whitefish.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,22 @@
+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.webbeans.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+public @interface Whitefish
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/bootstrap/Whitefish.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java (from rev 1039, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/PassivatingContextTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,54 @@
+package org.jboss.webbeans.test.unit.context;
+
+import javax.webbeans.ApplicationScoped;
+import javax.webbeans.ConversationScoped;
+import javax.webbeans.RequestScoped;
+import javax.webbeans.SessionScoped;
+
+import org.jboss.webbeans.MetaDataCache;
+import org.testng.annotations.Test;
+
+public class PassivatingContextTest extends org.jboss.webbeans.test.AbstractTest
+{
+
+ /**
+ * The built-in session and conversation scopes are passivating. No other
+ * built-in scope is passivating.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ public void testIsSessionScopePassivating()
+ {
+ assert MetaDataCache.instance().getScopeModel(SessionScoped.class).isPassivating();
+ }
+
+ /**
+ * The built-in session and conversation scopes are passivating. No other
+ * built-in scope is passivating.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ public void testIsConversationScopePassivating()
+ {
+ assert MetaDataCache.instance().getScopeModel(ConversationScoped.class).isPassivating();
+ }
+
+ /**
+ * The built-in session and conversation scopes are passivating. No other
+ * built-in scope is passivating.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ public void testIsApplicationScopeNonPassivating()
+ {
+ assert !MetaDataCache.instance().getScopeModel(ApplicationScoped.class).isPassivating();
+ }
+
+ /**
+ * The built-in session and conversation scopes are passivating. No other
+ * built-in scope is passivating.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ public void testIsRequestScopeNonPassivating()
+ {
+ assert !MetaDataCache.instance().getScopeModel(RequestScoped.class).isPassivating();
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/context/PassivatingContextTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/Animal.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/Animal.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/Animal.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.definition;
+
+interface Animal
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalOrderStereotype.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalOrderStereotype.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalOrderStereotype.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.test.unit.definition;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.Stereotype;
+
+
+
+(a)Stereotype(requiredTypes={Animal.class, Order.class})
+@Target( { TYPE })
+@Retention(RUNTIME)
+@interface AnimalOrderStereotype
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalOrderStereotype.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalStereotype.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalStereotype.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalStereotype.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.test.unit.definition;
+
+import static java.lang.annotation.ElementType.FIELD;
+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.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.RequestScoped;
+import javax.webbeans.Stereotype;
+
+(a)Stereotype(requiredTypes=Animal.class)
+@Target( { TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@RequestScoped
+@interface AnimalStereotype
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/AnimalStereotype.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/Order.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/Order.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/Order.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.definition;
+
+import javax.webbeans.Production;
+
+@Production
+class Order
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/Order.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/RequestScopedAnimalStereotype.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/RequestScopedAnimalStereotype.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/RequestScopedAnimalStereotype.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.test.unit.definition;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.RequestScoped;
+import javax.webbeans.Stereotype;
+
+(a)Stereotype(requiredTypes=Animal.class, supportedScopes=RequestScoped.class)
+@Target( { TYPE })
+@Retention(RUNTIME)
+public @interface RequestScopedAnimalStereotype
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/RequestScopedAnimalStereotype.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java (from rev 1037, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/StereotypesTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,57 @@
+package org.jboss.webbeans.test.unit.definition;
+
+import java.util.Arrays;
+
+import javax.webbeans.RequestScoped;
+
+import org.jboss.webbeans.model.StereotypeModel;
+import org.jboss.webbeans.test.AbstractTest;
+import org.jboss.webbeans.test.SpecVersion;
+import org.testng.annotations.Test;
+
+@SpecVersion("20081206")
+public class StereotypesTest extends AbstractTest
+{
+
+ @Test
+ public void testAnimalStereotype()
+ {
+ StereotypeModel<AnimalStereotype> animalStereotype = new StereotypeModel<AnimalStereotype>(AnimalStereotype.class);
+ assert animalStereotype.getDefaultScopeType().annotationType().equals(RequestScoped.class);
+ assert animalStereotype.getInterceptorBindings().size() == 0;
+ assert animalStereotype.getRequiredTypes().size() == 1;
+ assert animalStereotype.getRequiredTypes().contains(Animal.class);
+ assert animalStereotype.getSupportedScopes().size() == 0;
+ assert !animalStereotype.isBeanNameDefaulted();
+ assert animalStereotype.getDefaultDeploymentType() == null;
+ }
+
+ @Test
+ public void testAnimalOrderStereotype()
+ {
+ StereotypeModel<AnimalOrderStereotype> animalStereotype = new StereotypeModel<AnimalOrderStereotype>(AnimalOrderStereotype.class);
+ assert animalStereotype.getDefaultScopeType() == null;
+ assert animalStereotype.getInterceptorBindings().size() == 0;
+ assert animalStereotype.getRequiredTypes().size() == 2;
+ Class<?> [] requiredTypes = {Animal.class, Order.class};
+ assert animalStereotype.getRequiredTypes().containsAll(Arrays.asList(requiredTypes));
+ assert animalStereotype.getSupportedScopes().size() == 0;
+ assert !animalStereotype.isBeanNameDefaulted();
+ assert animalStereotype.getDefaultDeploymentType() == null;
+ }
+
+ @Test
+ public void testRequestScopedAnimalStereotype()
+ {
+ StereotypeModel<RequestScopedAnimalStereotype> animalStereotype = new StereotypeModel<RequestScopedAnimalStereotype>(RequestScopedAnimalStereotype.class);
+ assert animalStereotype.getDefaultScopeType() == null;
+ assert animalStereotype.getInterceptorBindings().size() == 0;
+ assert animalStereotype.getRequiredTypes().size() == 1;
+ assert Animal.class.equals(animalStereotype.getRequiredTypes().iterator().next());
+ assert animalStereotype.getSupportedScopes().size() == 1;
+ assert animalStereotype.getSupportedScopes().contains(RequestScoped.class);
+ assert !animalStereotype.isBeanNameDefaulted();
+ assert animalStereotype.getDefaultDeploymentType() == null;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/definition/StereotypesTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/AnotherDeploymentType.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/AnotherDeploymentType.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/AnotherDeploymentType.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.test.unit.event;
+
+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.webbeans.DeploymentType;
+
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+@interface AnotherDeploymentType
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/AnotherDeploymentType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Asynchronous.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Asynchronous.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Asynchronous.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.test.unit.event;
+
+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.webbeans.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Asynchronous
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Asynchronous.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/DeferredEventNotificationTest.java (from rev 1036, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/DeferredEventNotificationTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/DeferredEventNotificationTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/DeferredEventNotificationTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,79 @@
+package org.jboss.webbeans.test.unit.event;
+
+import java.util.Arrays;
+
+import javax.webbeans.Observes;
+import javax.webbeans.Standard;
+
+import org.jboss.webbeans.bean.SimpleBean;
+import org.jboss.webbeans.introspector.AnnotatedMethod;
+import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
+import org.jboss.webbeans.introspector.jlr.AnnotatedMethodImpl;
+import org.jboss.webbeans.test.AbstractTest;
+import org.testng.annotations.Test;
+
+/**
+ * Unit tests for the deferred event notification object used to delay
+ * notification till the end of a transaction.
+ *
+ * @author David Allen
+ *
+ */
+public class DeferredEventNotificationTest extends AbstractTest
+{
+
+ public class Event
+ {
+ // Simple class used for testing
+ }
+
+ @Override
+ protected void addStandardDeploymentTypesForTests()
+ {
+ manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, AnotherDeploymentType.class));
+ }
+
+ public class AnObserver
+ {
+ protected boolean notified = false;
+
+ public void observe(@Observes @Asynchronous Event e)
+ {
+ // An observer method
+ this.notified = true;
+ }
+ }
+
+ /**
+ * Test method for
+ * {@link org.jboss.webbeans.event.DeferredEventNotification#beforeCompletion()}
+ * .
+ */
+ @Test(groups={"deferredEvent", "broken"})
+ public final void testBeforeCompletion() throws Exception
+ {
+ // When the transaction is committed, the beforeCompletion() method is
+ // invoked which in turn invokes the observer. Here the mock observer
+ // is used to keep track of the event being fired.
+ SimpleBean<Tuna> tuna;
+ AnnotatedMethod<Object> om;
+
+
+ // Create an observer with known binding types
+ //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ //annotations.put(Asynchronous.class, new AsynchronousAnnotationLiteral());
+ //AnnotatedClass<Tuna> annotatedItem = new SimpleAnnotatedClass<Tuna>(Tuna.class, annotations);
+ // TODO This should test a real class
+ tuna = SimpleBean.of(Tuna.class, manager);
+ om = new AnnotatedMethodImpl<Object>(AnObserver.class.getMethod("observe", new Class[] { Event.class }), new AnnotatedClassImpl<AnObserver>(AnObserver.class));
+
+ AnObserver observerInstance = new AnObserver();
+ // TODO Fix this Observer<Event> observer = new MockObserverImpl<Event>(tuna, om, Event.class);
+ //((MockObserverImpl<Event>) observer).setInstance(observerInstance);
+ Event event = new Event();
+ //DeferredEventNotification<Event> deferredNotification = new DeferredEventNotification<Event>(event, observer);
+ //deferredNotification.beforeCompletion();
+ assert observerInstance.notified;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/DeferredEventNotificationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Tuna.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Tuna.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Tuna.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.test.unit.event;
+
+import javax.webbeans.RequestScoped;
+
+import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
+
+@AnotherDeploymentType
+@RequestScoped
+class Tuna
+{
+
+ public String getName()
+ {
+ return "Ophir";
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/event/Tuna.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Animal.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Animal.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Animal.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.implementation;
+
+interface Animal
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Antelope.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Antelope.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Antelope.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.implementation;
+
+class Antelope implements Animal
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Antelope.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java (from rev 1036, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/ClassAnnotatedItemTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,48 @@
+package org.jboss.webbeans.test.unit.implementation;
+
+import java.lang.annotation.Annotation;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.webbeans.DeploymentType;
+import javax.webbeans.Production;
+import javax.webbeans.Stereotype;
+
+import org.jboss.webbeans.introspector.AnnotatedClass;
+import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
+import org.testng.annotations.Test;
+
+public class ClassAnnotatedItemTest
+{
+
+ @Test
+ public void testDeclaredAnnotations()
+ {
+ AnnotatedClass<Order> annotatedElement = new AnnotatedClassImpl<Order>(Order.class);
+ assert annotatedElement.getAnnotations().size() == 1;
+ assert annotatedElement.getAnnotation(Production.class) != null;
+ assert annotatedElement.getType().equals(Order.class);
+ }
+
+ @Test
+ public void testMetaAnnotations()
+ {
+ AnnotatedClass<Order> annotatedElement = new AnnotatedClassImpl<Order>(Order.class);
+ Set<Annotation> annotations = annotatedElement.getMetaAnnotations(DeploymentType.class);
+ assert annotations.size() == 1;
+ Iterator<Annotation> it = annotations.iterator();
+ Annotation production = it.next();
+ assert Production.class.equals(production.annotationType());
+ }
+
+ @Test
+ public void testEmpty()
+ {
+ AnnotatedClass<Order> annotatedElement = new AnnotatedClassImpl<Order>(Order.class);
+ assert annotatedElement.getAnnotation(Stereotype.class) == null;
+ assert annotatedElement.getMetaAnnotations(Stereotype.class).size() == 0;
+ AnnotatedClass<Antelope> classWithNoAnnotations = new AnnotatedClassImpl<Antelope>(Antelope.class);
+ assert classWithNoAnnotations.getAnnotations().size() == 0;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewEnterpriseBeanTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,64 @@
+package org.jboss.webbeans.test.unit.implementation;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+import org.jboss.webbeans.bean.EnterpriseBean;
+import org.jboss.webbeans.bean.NewEnterpriseBean;
+import org.jboss.webbeans.introspector.AnnotatedItem;
+import org.jboss.webbeans.test.AbstractTest;
+import org.jboss.webbeans.test.SpecVersion;
+import org.jboss.webbeans.util.Proxies.TypeInfo;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+@SpecVersion("20081222")
+public class NewEnterpriseBeanTest extends AbstractTest
+{
+ private EnterpriseBean<WrappedEnterpriseBean> wrappedEnterpriseBean;
+ private NewEnterpriseBean<WrappedEnterpriseBean> newEnterpriseBean;
+
+ @BeforeMethod
+ public void initNewBean() {
+ addToEjbCache(WrappedEnterpriseBean.class);
+ wrappedEnterpriseBean = EnterpriseBean.of(WrappedEnterpriseBean.class, manager);
+ manager.addBean(wrappedEnterpriseBean);
+ newEnterpriseBean = NewEnterpriseBean.of(WrappedEnterpriseBean.class, manager);
+ manager.addBean(newEnterpriseBean);
+ }
+
+ @Test(groups = { "new", "broken" })
+ public void testNewBeanHasImplementationClassOfInjectionPointType()
+ {
+ assert newEnterpriseBean.getType().equals(WrappedEnterpriseBean.class);
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanIsEnterpriseWebBeanIfParameterTypeIsEnterpriseWebBean()
+ {
+ assert wrappedEnterpriseBean.getType().equals(newEnterpriseBean.getType());
+ assert manager.getEjbDescriptorCache().containsKey(newEnterpriseBean.getType());
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
+ {
+ assert newEnterpriseBean.getInitializerMethods().equals(wrappedEnterpriseBean.getInitializerMethods());
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
+ {
+ Set<AnnotatedItem<?, ?>> wrappedBeanInjectionPoints = wrappedEnterpriseBean.getAnnotatedInjectionPoints();
+ Set<AnnotatedItem<?, ?>> newBeanInjectionPoints = newEnterpriseBean.getAnnotatedInjectionPoints();
+ assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasNoDisposalMethods()
+ {
+ Class<?> type = TypeInfo.ofTypes(newEnterpriseBean.getTypes()).getSuperClass();
+ assert manager.resolveDisposalMethods(type, newEnterpriseBean.getBindings().toArray(new Annotation[0])).isEmpty();
+ }
+
+}
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,59 @@
+package org.jboss.webbeans.test.unit.implementation;
+
+import java.util.Set;
+
+import org.jboss.webbeans.bean.NewSimpleBean;
+import org.jboss.webbeans.bean.SimpleBean;
+import org.jboss.webbeans.introspector.AnnotatedItem;
+import org.jboss.webbeans.test.AbstractTest;
+import org.jboss.webbeans.test.SpecVersion;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+@SpecVersion("20081222")
+public class NewSimpleBeanTest extends AbstractTest
+{
+ private SimpleBean<WrappedSimpleBean> wrappedSimpleBean;
+ private NewSimpleBean<WrappedSimpleBean> newSimpleBean;
+
+ @BeforeMethod
+ public void initNewBean() {
+ wrappedSimpleBean = SimpleBean.of(WrappedSimpleBean.class, manager);
+ manager.addBean(wrappedSimpleBean);
+ newSimpleBean = NewSimpleBean.of(WrappedSimpleBean.class, manager);
+ manager.addBean(newSimpleBean);
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasImplementationClassOfInjectionPointType()
+ {
+ assert newSimpleBean.getType().equals(WrappedSimpleBean.class);
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanIsSimpleWebBeanIfParameterTypeIsSimpleWebBean()
+ {
+ assert newSimpleBean.getType().equals(wrappedSimpleBean.getType());
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasSameConstructorAsWrappedBean()
+ {
+ assert wrappedSimpleBean.getConstructor().equals(newSimpleBean.getConstructor());
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
+ {
+ assert newSimpleBean.getInitializerMethods().equals(wrappedSimpleBean.getInitializerMethods());
+ }
+
+ @Test(groups = { "new" })
+ public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
+ {
+ Set<AnnotatedItem<?, ?>> wrappedBeanInjectionPoints = wrappedSimpleBean.getAnnotatedInjectionPoints();
+ Set<AnnotatedItem<?, ?>> newBeanInjectionPoints = newSimpleBean.getAnnotatedInjectionPoints();
+ assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
+ }
+
+}
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Order.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Order.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Order.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.implementation;
+
+import javax.webbeans.Production;
+
+@Production
+class Order
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/Order.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.test.unit.implementation;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Named;
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+@Stateful
+@Named("John")
+class WrappedEnterpriseBean
+{
+ @Remove
+ public void bye() {
+ }
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedSimpleBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedSimpleBean.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedSimpleBean.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.test.unit.implementation;
+
+import java.io.Serializable;
+
+import javax.webbeans.Named;
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+@Named("Fred")
+class WrappedSimpleBean implements Serializable
+{
+ public WrappedSimpleBean() {
+
+ }
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedSimpleBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Animal.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Animal.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Animal.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+interface Animal
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/AnotherDeploymentType.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/AnotherDeploymentType.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/AnotherDeploymentType.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,20 @@
+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.webbeans.DeploymentType;
+
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+@interface AnotherDeploymentType
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/AnotherDeploymentType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Chunky.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Chunky.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Chunky.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,24 @@
+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.webbeans.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Chunky
+{
+
+ boolean realChunky();
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Chunky.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Cod.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Cod.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Cod.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import javax.webbeans.Named;
+import javax.webbeans.Production;
+
+
+@Production
+@Whitefish
+@Chunky(realChunky=true)
+@Named("whitefish")
+class Cod implements ScottishFish
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Cod.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Expensive.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Expensive.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Expensive.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,28 @@
+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.webbeans.BindingType;
+import javax.webbeans.NonBinding;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Expensive
+{
+
+ boolean veryExpensive();
+
+ @NonBinding
+ int cost();
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Expensive.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Farmer.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Farmer.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Farmer.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import javax.webbeans.Production;
+
+@Production
+class Farmer<T>
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Farmer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/FishFarm.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/FishFarm.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/FishFarm.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,37 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import javax.webbeans.Current;
+import javax.webbeans.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;
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/FishFarm.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Haddock.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Haddock.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Haddock.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import javax.webbeans.Named;
+import javax.webbeans.Production;
+
+@Production
+@Named
+class Haddock implements Animal
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Haddock.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java (from rev 1036, ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/ResolutionByTypeTest.java)
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,78 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import java.util.Set;
+
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.bean.SimpleBean;
+import org.jboss.webbeans.binding.CurrentBinding;
+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.test.AbstractTest;
+import org.testng.annotations.Test;
+
+public class ResolutionByTypeTest extends AbstractTest
+{
+
+ private AnnotatedClass<FishFarm> fishFarmClass = new AnnotatedClassImpl<FishFarm>(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.getBindingTypes().size() == 1;
+ assert tuna.getBindingTypes().contains(new CurrentBinding());
+ assert tuna.getType().isAssignableFrom(Tuna.class);
+ }
+
+ @Test
+ public void testOneBindingType() 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 testABindingType() 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);
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ResolutionByTypeTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Salmon.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Salmon.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Salmon.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import javax.webbeans.Named;
+import javax.webbeans.Production;
+
+@Production
+@Named
+class Salmon implements ScottishFish
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Salmon.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ScottishFish.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ScottishFish.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ScottishFish.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+interface ScottishFish extends Animal
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/ScottishFish.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/SeaBass.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/SeaBass.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/SeaBass.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import javax.webbeans.Production;
+import javax.webbeans.RequestScoped;
+
+@Production
+@RequestScoped
+class SeaBass implements Animal
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/SeaBass.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Sole.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Sole.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Sole.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import javax.webbeans.Named;
+import javax.webbeans.Production;
+
+@Production
+@Whitefish
+@Named("whitefish")
+class Sole implements ScottishFish
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Sole.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Tuna.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Tuna.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Tuna.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.test.unit.lookup;
+
+import javax.webbeans.RequestScoped;
+
+@AnotherDeploymentType
+@RequestScoped
+class Tuna
+{
+
+ public String getName()
+ {
+ return "Ophir";
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Tuna.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Whitefish.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Whitefish.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Whitefish.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,22 @@
+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.webbeans.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Whitefish
+{
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/lookup/Whitefish.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/unit-tests.xml
===================================================================
--- ri/trunk/webbeans-ri/unit-tests.xml 2009-01-17 19:12:36 UTC (rev 1044)
+++ ri/trunk/webbeans-ri/unit-tests.xml 2009-01-17 19:46:43 UTC (rev 1045)
@@ -33,13 +33,14 @@
</run>
</groups>
<packages>
- <package name="org.jboss.webbeans.test.tck"></package>
- <package name="org.jboss.webbeans.test"></package>
- <package name="org.jboss.webbeans.test.contexts"></package>
- <package name="org.jboss.webbeans.examples"></package>
- <package name="org.jboss.webbeans.test.ejb"></package>
- <package name="org.jboss.webbeans.test.newbean"></package>
- <package name="org.jboss.webbeans.test.unit"></package>
+ <package name="org.jboss.webbeans.test" />
+ <package name="org.jboss.webbeans.examples" />
+ <package name="org.jboss.webbeans.test.unit.bootstrap" />
+ <package name="org.jboss.webbeans.test.unit.context" />
+ <package name="org.jboss.webbeans.test.unit.definition" />
+ <package name="org.jboss.webbeans.test.unit.event" />
+ <package name="org.jboss.webbeans.test.unit.implementation" />
+ <package name="org.jboss.webbeans.test.unit.lookup" />
</packages>
</test>
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/commonAnnotations/ResourceInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/commonAnnotations/ResourceInjectionTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/commonAnnotations/ResourceInjectionTest.java 2009-01-17 19:46:43 UTC (rev 1045)
@@ -0,0 +1,28 @@
+package org.jboss.webbeans.tck.tests.implementation.commonAnnotations;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.tests.AbstractEjbEmbeddableTest;
+import org.testng.annotations.Test;
+
+public class ResourceInjectionTest extends AbstractEjbEmbeddableTest
+{
+
+ @Test(groups="stub") @SpecAssertion(section="3.10")
+ public void testInjectionOfPersistenceContext()
+ {
+ assert false;
+ }
+
+ @Test(groups="stub") @SpecAssertion(section="3.10")
+ public void testInjectionOfResource()
+ {
+ assert false;
+ }
+
+ @Test(groups="stub") @SpecAssertion(section="3.10")
+ public void testInjectionOfEJB()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/commonAnnotations/ResourceInjectionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 2 months
[webbeans-commits] Webbeans SVN: r1044 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck: tests/context and 6 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-17 14:12:36 -0500 (Sat, 17 Jan 2009)
New Revision: 1044
Removed:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/ApplicationContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/City.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/ConversationContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Helsinki.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Hyvinkaa.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Joensuu.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Jyvaskyla.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/RequestContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/SessionContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Turku.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Vaasa.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Violation.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityBinding.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Espoo_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hamina_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/Horse.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/ShetlandPony.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/Species.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Horse.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Mullet.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Scallop_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ScopeTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ShetlandPony.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Elk_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/FallowDeer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Gazelle_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Mammal.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Reindeer.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/RoeDeer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Springbok.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WrappedEnterpriseBean.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/simple/Goose_Broken.java
Log:
tidy up
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/WebBeansTCKImpl.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -38,6 +38,7 @@
public WebBeansTCKImpl()
{
super();
+
}
@Override
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/ApplicationContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/ApplicationContextTest.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/ApplicationContextTest.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,92 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
-import org.jboss.webbeans.tck.tests.AbstractTest;
-import org.testng.annotations.Test;
-
-@SpecVersion("20081206")
-public class ApplicationContextTest extends AbstractTest
-{
-
- /**
- * The application scope is active during the service() method of any servlet
- * in the web application.
- */
- @Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "9.6.3")
- public void testApplicationScopeActiveDuringServiceMethod()
- {
- assert false;
- }
-
- /**
- * The application scope is active during any Java EE web service invocation.
- */
- @Test(groups = { "stub", "contexts", "webservice" })
- @SpecAssertion(section = "9.6.3")
- public void testApplicationScopeActiveDuringWebSericeInvocation()
- {
- assert false;
- }
-
- /**
- * The application scope is also active during any remote method invocation
- * of any EJB bean, during any call to an EJB timeout method and during
- * message delivery to any EJB message driven bean.
- */
- @Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.3")
- public void testApplicationScopeActiveDuringRemoteMethodInvocationOfEjb()
- {
- assert false;
- }
-
- /**
- * The application scope is also active during any remote method invocation
- * of any EJB bean, during any call to an EJB timeout method and during
- * message delivery to any EJB message driven bean.
- */
- @Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.3")
- public void testApplicationScopeActiveDuringCallToEjbTimeoutMethod()
- {
- assert false;
- }
-
- /**
- * The application scope is also active during any remote method invocation
- * of any EJB bean, during any call to an EJB timeout method and during
- * message delivery to any EJB message driven bean.
- */
- @Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.3")
- public void testApplicationScopeActiveDuringEjbMessageDelivery()
- {
- assert false;
- }
-
- /**
- * The application context is shared between all servlet requests, web
- * service invocations, EJB remote method invocations, EJB timeouts and
- * message deliveries to message driven beans that execute within the same
- * application
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.3")
- public void testApplicationContextSharedBetweenInvokationsInApplication()
- {
- assert false;
- }
-
- /**
- * The application context is destroyed when the application is undeployed.
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.3")
- public void testApplicationScopeDestroyedWhenApplicationIsUndeployed()
- {
- assert false;
- }
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/City.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/City.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/City.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,8 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-class City
-{
- public void ping() {
-
- }
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/ConversationContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/ConversationContextTest.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/ConversationContextTest.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,231 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
-import org.jboss.webbeans.tck.tests.AbstractTest;
-import org.testng.annotations.Test;
-
-/**
- *
- * @author Nicklas Karlsson
- *
- */
-@SpecVersion("20081206")
-public class ConversationContextTest extends AbstractTest
-{
- /**
- * For a JSF faces request, the context is active from the beginning of the
- * apply request values phase, until the response is complete.
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testContextActiveFromBeginningOfApplyRequestValuesPhasetoResponseCompleteForJsfRequest()
- {
- assert false;
- }
-
- /**
- * For a JSF non-faces request, the context is active during the render
- * response phase
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testContextActiveDuringRenderResponsePhaseForNonFacesJsfRequest()
- {
- assert false;
- }
-
- /**
- * Any JSF request has exactly one associated conversation
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testJsfRequestHasExactlyOneAssociatedConversation()
- {
- assert false;
- }
-
- /**
- * The conversation associated with a JSF request is determined at the end of
- * the restore view phase and does not change during the request
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testAssociatedConversationOfJsfRequestIsDeterminedAtEndOfRestoreViewPhase()
- {
- assert false;
- }
-
- /**
- * The conversation associated with a JSF request is determined at the end of
- * the restore view phase and does not change during the request
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testAssociatedConversationOfJsfRequestDoesNotChangeDuringRequest()
- {
- assert false;
- }
-
- /**
- * By default, a conversation is transient
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testDefaultConversationIsTransient()
- {
- assert false;
- }
-
- /**
- * All long-running conversations have a string-valued unique identifier
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testConversationsHaveUniqueStringIdentifiers()
- {
- assert false;
- }
-
- /**
- * If the conversation associated with the current JSF request is in the
- * transient state at the end of a JSF request, it is destroyed, and the
- * conversation context is also destroyed.
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testTransientConversationIsDestroyedAtEndOfJsfRequest()
- {
- assert false;
- }
-
- /**
- * If the conversation associated with the current JSF request is in the
- * transient state at the end of a JSF request, it is destroyed, and the
- * conversation context is also destroyed.
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testTransientConversationContextIsDestroyedAtEndOfJsfRequest()
- {
- assert false;
- }
-
- /**
- * If the conversation associated with the current JSF request is in the
- * long-running state at the end of a JSF request, it is not destroyed
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testLongRunningConversationNotDestroyedAtEndOfJsfRequest()
- {
- assert false;
- }
-
- /**
- * The long-running conversation context associated with a request that
- * renders a JSF view is automatically propagated to any faces request (JSF
- * form submission) that originates from that rendered page.
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testLongRunningConversationOfJsfRenderingRequestIsPropagatedToRequestFromRenderedPage()
- {
- assert false;
- }
-
- /**
- * The long-running conversation context associated with a request that
- * results in a JSF redirect (via a navigation rule) is automatically
- * propagated to the resulting non-faces request, and to any other subsequent
- * request to the same URL. This is accomplished via use of a GET request
- * parameter named cid containing the unique identifier of the conversation.
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testLongRunningConversationOfJsfRedirectIsPropagatedToNonFacesRequest()
- {
- assert false;
- }
-
- /**
- * The long-running conversation associated with a request may be propagated
- * to any non-faces request via use of a GET request parameter named cid
- * containing the unique identifier of the conversation. In this case, the
- * application must manage this request parameter
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testLongRunningConversationManuallyPropagatedToNonFacesRequest()
- {
- assert false;
- }
-
- /**
- * When no conversation is propagated to a JSF request, the request is
- * associated with a new transient conversation.
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testNewTransientRequestIsCreatedWhenNoConversationIsPropagated()
- {
- assert false;
- }
-
- /**
- * All long-running conversations are scoped to a particular HTTP servlet
- * session and may not cross session boundaries
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testLongRunningConversationsMayNotCrossHttpSessions()
- {
- assert false;
- }
-
- /**
- * When the HTTP servlet session is invalidated, all long-running
- * conversation contexts created during the current session are destroyed
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testAllLongRunningConversationContextsOfInvalidatedHttpSessionAreDestroyed()
- {
- assert false;
- }
-
- /**
- * The Web Bean manager is permitted to arbitrarily destroy any long-running
- * conversation that is associated with no current JSF request, in order to
- * conserve resources
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testManagerCanDestroyOrphanedLongRunningConversations()
- {
- assert false;
- }
-
- /**
- * If the propagated conversation cannot be restored, the request is
- * associated with a new transient conversation
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testNewTransientConversationIsCreatedWhenConversationCannotBeRestored()
- {
- assert false;
- }
-
- /**
- * The Web Bean manager ensures that a long-running conversation may be
- * associated with at most one request at a time, by blocking or rejecting
- * concurrent requests.
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.4")
- public void testConcurrentRequestsToLongRunningConversationsAreHandled()
- {
- assert false;
- }
-}
\ No newline at end of file
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Helsinki.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Helsinki.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Helsinki.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,11 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import javax.ejb.Stateful;
-import javax.webbeans.Dependent;
-
-@Dependent
-@Stateful
-class Helsinki
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Hyvinkaa.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Hyvinkaa.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Hyvinkaa.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,15 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import java.io.Serializable;
-
-import javax.webbeans.Current;
-import javax.webbeans.SessionScoped;
-
-@SuppressWarnings("serial")
-@SessionScoped
-class Hyvinkaa implements Serializable
-{
- @SuppressWarnings("unused")
- @Current
- private transient Violation reference;
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Joensuu.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Joensuu.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Joensuu.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,16 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import java.io.Serializable;
-
-import javax.webbeans.Current;
-import javax.webbeans.SessionScoped;
-
-@SuppressWarnings("serial")
-@SessionScoped
-class Joensuu implements Serializable
-{
- @SuppressWarnings("unused")
- @Current
- private transient Violation reference;
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Jyvaskyla.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Jyvaskyla.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Jyvaskyla.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,12 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import java.io.Serializable;
-
-import javax.webbeans.SessionScoped;
-
-@SuppressWarnings("serial")
-@SessionScoped
-class Jyvaskyla implements Serializable
-{
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/RequestContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/RequestContextTest.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/RequestContextTest.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,124 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
-import org.jboss.webbeans.tck.tests.AbstractTest;
-import org.testng.annotations.Test;
-
-@SpecVersion("20081206")
-public class RequestContextTest extends AbstractTest
-{
-
- /**
- * The request scope is active during the service() method of any Servlet in
- * the web application.
- */
- @Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "9.6.1")
- public void testRequestScopeActiveDuringServiceMethod()
- {
- assert false;
- }
-
- /**
- * The request context is destroyed at the end of the servlet request, after
- * the Servlet service() method returns.
- */
- @Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "9.6.1")
- public void testRequestScopeIsDestroyedAfterServiceMethod()
- {
- assert false;
- }
-
- /**
- * The request scope is active during any Java EE web service invocation.
- */
- @Test(groups = { "stub", "contexts", "webservice" })
- @SpecAssertion(section = "9.6.1")
- public void testRequestScopeActiveDuringWebSericeInvocation()
- {
- assert false;
- }
-
- /**
- * The request context is destroyed after the web service invocation
- * completes
- */
- @Test(groups = { "stub", "contexts", "webservice" })
- @SpecAssertion(section = "9.6.1")
- public void testRequestScopeIsDestroyedAfterWebServiceInvocation()
- {
- assert false;
- }
-
- /**
- * The request scope is active during any remote method invocation of any EJB
- * bean, during any call to an EJB timeout method and during message delivery
- * to any EJB message driven bean.
- */
- @Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.1")
- public void testRequestScopeActiveDuringRemoteMethodInvocationOfEjb()
- {
- assert false;
- }
-
- /**
- * The request scope is active during any remote method invocation of any EJB
- * bean, during any call to an EJB timeout method and during message delivery
- * to any EJB message driven bean.
- */
- @Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.1")
- public void testRequestScopeActiveDuringCallToEjbTimeoutMethod()
- {
- assert false;
- }
-
- /**
- * The request scope is active during any remote method invocation of any EJB
- * bean, during any call to an EJB timeout method and during message delivery
- * to any EJB message driven bean.
- */
- @Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.1")
- public void testRequestScopeActiveDuringEjbMessageDelivery()
- {
- assert false;
- }
-
- /**
- * The request context is destroyed after the remote method invocation,
- * timeout or message delivery completes.
- */
- @Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.1")
- public void testRequestScopeDestroyedAfterRemoteMethodInvocationOfEjb()
- {
- assert false;
- }
-
- /**
- * The request context is destroyed after the remote method invocation,
- * timeout or message delivery completes.
- */
- @Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.1")
- public void testRequestScopeDestroyedAfterCallToEjbTimeoutMethod()
- {
- assert false;
- }
-
- /**
- * The request context is destroyed after the remote method invocation,
- * timeout or message delivery completes.
- */
- @Test(groups = { "stub", "contexts", "ejb3" })
- @SpecAssertion(section = "9.6.1")
- public void testRequestScopeDestroyedAfterEjbMessageDelivery()
- {
- assert false;
- }
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/SessionContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/SessionContextTest.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/SessionContextTest.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,45 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
-import org.jboss.webbeans.tck.tests.AbstractTest;
-import org.testng.annotations.Test;
-
-@SpecVersion("2001206")
-public class SessionContextTest extends AbstractTest
-{
-
- /**
- * The session scope is active during the service() method of any servlet in
- * the web application
- */
- @Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "9.6.2")
- public void testSessionScopeActiveDuringServiceMethod()
- {
- assert false;
- }
-
- /**
- * The session context is shared between all servlet requests that occur in
- * the same HTTP servlet session
- */
- @Test(groups = { "stub", "contexts", "servlet" })
- @SpecAssertion(section = "9.6.2")
- public void testSessionContextSharedBetweenServletRequestsInSameHttpSession()
- {
- assert false;
- }
-
- /**
- * The session context is destroyed when the HTTPSession is invalidated or
- * times out.
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6.2")
- public void testSessionContextDestroyedWhenHttpSessionInvalidatedOrTimesOut()
- {
- assert false;
- }
-
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Turku.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Turku.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Turku.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,15 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.webbeans.SessionScoped;
-
-@Stateful
-@SessionScoped
-class Turku
-{
- @Remove
- public void bye() {
-
- }
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Vaasa.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Vaasa.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Vaasa.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import java.io.Serializable;
-
-import javax.webbeans.Current;
-import javax.webbeans.SessionScoped;
-
-@SuppressWarnings("serial")
-@SessionScoped
-class Vaasa implements Serializable
-{
- @SuppressWarnings("unused")
- @Current private Helsinki ejb;
-}
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Violation.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Violation.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/Violation.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.tck.tests.context;
-
-import javax.webbeans.Dependent;
-
-@Dependent
-public class Violation
-{
-
-}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityBinding.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/CityBinding.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -14,7 +14,7 @@
@Dependent
@Target({TYPE, METHOD})
@Retention(RUNTIME)
-public @interface CityBinding
+@interface CityBinding
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Espoo_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Espoo_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Espoo_Broken.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -7,7 +7,7 @@
@Stateful
@SessionScoped
-public class Espoo_Broken
+class Espoo_Broken
{
@Current
Violation reference;
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hamina_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hamina_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/context/passivating/Hamina_Broken.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -3,7 +3,7 @@
import javax.webbeans.SessionScoped;
@SessionScoped
-public class Hamina_Broken
+class Hamina_Broken
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/Horse.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/Horse.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/Horse.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,7 +1,7 @@
package org.jboss.webbeans.tck.tests.definition.binding;
@Species
-public class Horse
+class Horse
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/ShetlandPony.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/ShetlandPony.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/ShetlandPony.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,6 +1,6 @@
package org.jboss.webbeans.tck.tests.definition.binding;
-public class ShetlandPony extends Horse
+class ShetlandPony extends Horse
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/Species.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/Species.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/Species.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -16,7 +16,7 @@
@Retention(RUNTIME)
@Documented
@BindingType
-public @interface Species
+@interface Species
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Horse.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Horse.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Horse.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -2,7 +2,7 @@
@AnotherScope
-public class Horse
+class Horse
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Mullet.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Mullet.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Mullet.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,7 +1,7 @@
package org.jboss.webbeans.tck.tests.definition.scope;
@AnotherScopeType
-public class Mullet
+class Mullet
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Scallop_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Scallop_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Scallop_Broken.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -2,7 +2,7 @@
@AnimalStereotype
@FishStereotype
-public class Scallop_Broken
+class Scallop_Broken
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ScopeTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ScopeTypeTest.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ScopeTypeTest.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -9,7 +9,6 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.tests.AbstractTest;
-import org.jboss.webbeans.tck.tests.definition.binding.ShetlandPony;
import org.testng.annotations.Test;
@SpecVersion("20081206")
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ShetlandPony.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ShetlandPony.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ShetlandPony.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,6 +1,6 @@
package org.jboss.webbeans.tck.tests.definition.scope;
-public class ShetlandPony extends Horse
+class ShetlandPony extends Horse
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Elk_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Elk_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Elk_Broken.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,7 +1,7 @@
package org.jboss.webbeans.tck.tests.definition.stereotype;
@StereotypeWithTooManyScopeTypes_Broken
-public class Elk_Broken
+class Elk_Broken
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/FallowDeer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/FallowDeer_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/FallowDeer_Broken.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,7 +1,7 @@
package org.jboss.webbeans.tck.tests.definition.stereotype;
@StereotypeWithNonEmptyNamed_Broken
-public class FallowDeer_Broken
+class FallowDeer_Broken
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Gazelle_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Gazelle_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Gazelle_Broken.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,7 +1,7 @@
package org.jboss.webbeans.tck.tests.definition.stereotype;
@StereotypeWithTooManyDeploymentTypes_Broken
-public class Gazelle_Broken
+class Gazelle_Broken
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Mammal.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Mammal.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Mammal.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,6 +1,6 @@
package org.jboss.webbeans.tck.tests.definition.stereotype;
-public interface Mammal
+interface Mammal
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Reindeer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Reindeer.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Reindeer.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,7 +1,7 @@
package org.jboss.webbeans.tck.tests.definition.stereotype;
@HornedMammalStereotype
-public class Reindeer implements Animal
+class Reindeer implements Animal
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/RoeDeer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/RoeDeer_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/RoeDeer_Broken.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -1,7 +1,7 @@
package org.jboss.webbeans.tck.tests.definition.stereotype;
@StereotypeWithBindingTypes_Broken
-public class RoeDeer_Broken
+class RoeDeer_Broken
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Springbok.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Springbok.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/stereotype/Springbok.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -5,7 +5,7 @@
@ApplicationScopedHornedMammalStereotype
@RequestScopedAnimalStereotype
@ApplicationScoped
-public class Springbok implements Animal
+class Springbok implements Animal
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -5,7 +5,7 @@
import javax.webbeans.Destructor;
@Stateless
-public class Armant_Broken
+class Armant_Broken
{
@Destructor @Remove
public void bye() {
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WrappedEnterpriseBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WrappedEnterpriseBean.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WrappedEnterpriseBean.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -8,7 +8,7 @@
@SessionScoped
@Stateful
@Named("John")
-public class WrappedEnterpriseBean
+class WrappedEnterpriseBean
{
@Remove
public void bye() {
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/simple/Goose_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/simple/Goose_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/simple/Goose_Broken.java 2009-01-17 19:12:36 UTC (rev 1044)
@@ -4,7 +4,7 @@
import javax.webbeans.Production;
@Production
-public class Goose_Broken
+class Goose_Broken
{
@Initializer
17 years, 2 months
[webbeans-commits] Webbeans SVN: r1043 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid and 4 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-17 14:01:47 -0500 (Sat, 17 Jan 2009)
New Revision: 1043
Added:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractEjbEmbeddableTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Beagle_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Boxer_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Bullmastiff_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Dachshund_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanDeclarationTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanSpecializationTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Giraffe.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoldenRetriever.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoodDoggie.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreatDane.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreaterDane.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Greyhound_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Hound.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/HoundOfBaskerville.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Husky_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/IrishTerrier_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/JackRussellTerrier.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Koirus.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Labrador.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Laika.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Leopard.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/LocalGoodDoggie.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pekingese_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pitbull.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pug_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pumi_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Rottweiler.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/RussellTerrier.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Saluki.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Spitz.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Tame.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Toller.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WelshCorgie.java
Removed:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanDeclarationTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanLifecycleTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanRemoveMethodTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanSpecializationTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/GoodDoggie.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Pitbull.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Toller.java
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/BeansImpl.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ContextsImpl.java
tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Contexts.java
Log:
port ejb tests
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanDeclarationTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanDeclarationTest.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanDeclarationTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,400 +0,0 @@
-package org.jboss.webbeans.test.ejb;
-
-import javax.webbeans.DefinitionException;
-import javax.webbeans.DeploymentException;
-
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecAssertion;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.beans.Giraffe;
-import org.jboss.webbeans.test.beans.Leopard;
-import org.jboss.webbeans.test.ejb.invalid.Beagle;
-import org.jboss.webbeans.test.ejb.invalid.Boxer;
-import org.jboss.webbeans.test.ejb.invalid.Bullmastiff;
-import org.jboss.webbeans.test.ejb.invalid.Dachshund;
-import org.jboss.webbeans.test.ejb.invalid.Greyhound;
-import org.jboss.webbeans.test.ejb.invalid.Husky;
-import org.jboss.webbeans.test.ejb.invalid.IrishTerrier;
-import org.jboss.webbeans.test.ejb.invalid.Pekingese;
-import org.jboss.webbeans.test.ejb.invalid.Pug;
-import org.jboss.webbeans.test.ejb.invalid.Saluki;
-import org.jboss.webbeans.test.ejb.valid.Labrador;
-import org.jboss.webbeans.test.ejb.valid.Laika;
-import org.jboss.webbeans.test.ejb.valid.Pitbull;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-/**
- * Sections
- *
- * 3.3. Enterprise Web Beans
- * 3.3.1. Which EJBs are enterprise Web Beans?
- * 3.3.2. API types of an enterprise Web Bean
- * 3.3.3. Declaring an enterprise Web Bean using annotations
- * 3.3.4. Declaring an enterprise Web Bean using XML
- *
- * @author Nicklas Karlsson
- */
-@SpecVersion("20081206")
-@SuppressWarnings("unused")
-public class EnterpriseBeanDeclarationTest extends AbstractTest
-{
-
- @BeforeMethod
- public void setupEjbDescriptors()
- {
- addToEjbCache(Pug.class);
- addToEjbCache(Giraffe.class);
- addToEjbCache(Husky.class);
- addToEjbCache(Pitbull.class);
- addToEjbCache(IrishTerrier.class);
- addToEjbCache(Laika.class);
- addToEjbCache(Leopard.class);
- addToEjbCache(Labrador.class);
- addToEjbCache(Greyhound.class);
- addToEjbCache(Dachshund.class);
- addToEjbCache(Bullmastiff.class);
- addToEjbCache(Pekingese.class);
- addToEjbCache(Boxer.class);
- addToEjbCache(Beagle.class);
- addToEjbCache(Saluki.class);
- }
-
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
- @Test(groups = { "enterpriseBeans" })
- @SpecAssertion(section = "3.3")
- public void testStatelessWithDependentScopeOK()
- {
- EnterpriseBean<Giraffe> giraffe = EnterpriseBean.of(Giraffe.class, manager);
- }
-
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testStatelessWithRequestScopeFails()
- {
- EnterpriseBean<Beagle> beagle = EnterpriseBean.of(Beagle.class, manager);
- }
-
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
-
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testStatelessWithConversationScopeFails()
- {
- EnterpriseBean<Boxer> boxer = EnterpriseBean.of(Boxer.class, manager);
- }
-
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testStatelessWithSessionScopeFails()
- {
- EnterpriseBean<Bullmastiff> boxer = EnterpriseBean.of(Bullmastiff.class, manager);
- }
-
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testStatelessWithApplicationScopeFails()
- {
- EnterpriseBean<Dachshund> dachshund = EnterpriseBean.of(Dachshund.class, manager);
- }
-
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "enterpriseBeans" })
- @SpecAssertion(section = "3.3")
- public void testSingletonWithDependentScopeOK()
- {
- EnterpriseBean.of(Labrador.class, manager);
- }
-
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testSingletonWithRequestScopeFails()
- {
- EnterpriseBean<Greyhound> greyhound = EnterpriseBean.of(Greyhound.class, manager);
- }
-
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testSingletonWithConversationScopeFails()
- {
- EnterpriseBean<Husky> husky = EnterpriseBean.of(Husky.class, manager);
- }
-
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testSingletonWithSessionScopeFails()
- {
- EnterpriseBean<IrishTerrier> irishTerrier = EnterpriseBean.of(IrishTerrier.class, manager);
- }
-
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "enterpriseBeans" })
- @SpecAssertion(section = "3.3")
- public void testSingletonWithApplicationScopeOK()
- {
- EnterpriseBean<Laika> laika = EnterpriseBean.of(Laika.class, manager);
- }
-
- /**
- * However, in any deployment, there may be at most one most specialized
- * enabled enterprise Web Bean for any particular EJB enterprise bean.
- * Therefore, for each distinct EJB name in a module, there is at most one
- * Web Bean that may be called at runtime. If there is more than one most
- * specialized enabled enterprise Web Bean for a particular EJB enterprise
- * bean, a DeploymentException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(groups = { "enterpriseBeans", "stub" }, expectedExceptions = DeploymentException.class)
- @SpecAssertion(section = "3.3")
- public void testOnlyOneEnabledSpecializedEnterpriseBeanForImplmentation()
- {
- assert false;
- }
-
- /**
- * If the implementation class of an enterprise Web Bean is annotated @Interceptor
- * or @Decorator, a DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testEnterpriseBeanInterceptorFails()
- {
- EnterpriseBean<Pug> pug = EnterpriseBean.of(Pug.class, manager);
- }
-
- /**
- * If the implementation class of an enterprise Web Bean is annotated @Interceptor
- * or @Decorator, a DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3")
- public void testEnterpriseBeanDecoratorFails()
- {
- EnterpriseBean<Pekingese> pekingese = EnterpriseBean.of(Pekingese.class, manager);
- }
-
- /**
- * Only one Web Bean per implementation class may be defined using
- * annotations.
- */
- @Test(expectedExceptions = DefinitionException.class, groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3")
- public void testMultipleAnnotationDefinedEnterpriseBeansWithSameImplementationClassFails()
- {
- // TODO: testable?
- assert false;
- }
-
- /**
- * Note that multiple enterprise Web Beans may share the same implementation
- * class. This occurs when Web Beans are defined using XML
- */
- @Test(groups = { "webbeansxml", "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3")
- public void testMultipleXMLDefinedEnterpriseBeansWithSameImplementationClassOK()
- {
- assert false;
- }
-
- /**
- * All session beans exposing an EJB 3.x client view and declared via an EJB
- * component defining annotation on the EJB bean class are Web Beans, and
- * thus no special declaration is required.
- */
- @Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.1")
- public void testAnnotatedEnterpriseBean()
- {
- // TODO: dupe?
- assert false;
- }
-
- /**
- * Additional enterprise Web Beans for these EJBs may be defined using XML,
- * by specifying the bean class in web-beans.xml.
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "stub" })
- @SpecAssertion(section = "3.3.1")
- public void testAnnotatedEnterpriseBeanComplementedWithXML()
- {
- // TODO dupe?
- assert false;
- }
-
- /**
- * All session beans exposing an EJB 3.x client view and declared in
- * ejb-jar.xml are also Web Beans.
- */
- @Test(groups = { "enterpriseBeans", "ejbjarxml", "stub" })
- @SpecAssertion(section = "3.3.1")
- public void testEJBJARDefinedEnterpriseBean()
- {
- // TODO dupe?
- assert false;
- }
-
- /**
- * Additional enterprise Web Beans for these EJBs may be defined using XML,
- * by specifying the bean class and EJB name in web-beans.xml
- */
- @Test(groups = { "enterpriseBeans", "ejbjarxml", "webbeansxml", "stub" })
- @SpecAssertion(section = "3.3.1")
- public void testEJBJARDefinedEnterpriseBeanComplementedWithXML()
- {
- // TODO dupe?
- assert false;
- }
-
- /**
- * The set of API types for an enterprise Web Bean contains all local
- * interfaces of the bean that do not have wildcard type parameters or type
- * variables and their superinterfaces
- */
- @Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.2")
- public void testAPITypesAreLocalInterfacesWithoutWildcardTypesOrTypeVariablesWithSuperInterfaces()
- {
- assert false;
- }
-
- /**
- * If the EJB bean has a bean class local view and the bean class is not a
- * parameterized type, the set of API types contains the bean class and all
- * superclasses
- */
- @Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.2")
- public void testEnterpriseBeanWithLocalViewAndParameterizedTypeIncludesBeanClassAndSuperclassesInAPITypes()
- {
- assert false;
- }
-
- /**
- * In addition, java.lang.Object is an API type of every enterprise Web Bean.
- */
- @Test(groups = "enterpriseBeans")
- @SpecAssertion(section = "3.3.2")
- public void testObjectIsInAPITypes()
- {
- EnterpriseBean<Laika> laika = EnterpriseBean.of(Laika.class, manager);
- assert laika.getTypes().contains(Object.class);
- }
-
- /**
- * Remote interfaces are not included in the set of API types.
- */
- @Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.2")
- public void testRemoteInterfacesAreNotInAPITypes()
- {
- assert false;
- }
-
- /**
- * Enterprise Web Beans may be declared in web-beans.xml using the bean class
- * name (for EJBs defined using a component- defining annotation) or bean
- * class and EJB name (for EJBs defined in ejb-jar.xml). The ejbName
- * attribute declares the EJB name of an EJB defined in ejb-jar.xml
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "ejbjarxml", "stub" })
- @SpecAssertion(section = "3.3")
- public void testXMLFilesEJBNameUsage()
- {
- assert false;
- }
-
- /**
- * Enterprise Web Beans may not be message-driven beans. If an enterprise Web
- * Bean declared in XML is a message-driven bean, a DefinitionException is
- * thrown by the Web Bean manager at initialization time.
- */
- @Test(expectedExceptions = DefinitionException.class, groups = {"enterpriseBeans", "broken"})
- @SpecAssertion(section = "3.3")
- public void testMessageDrivenBeansNotOK()
- {
- EnterpriseBean<Leopard> Leopard = EnterpriseBean.of(Leopard.class, manager);
- }
-
- /**
- * The default name for an enterprise Web Bean is the unqualified class name
- * of the Web Bean implementation class, after converting the first character
- * to lower case.
- */
- @Test(groups = "enterpriseBeans")
- @SpecAssertion(section = "3.3.7")
- public void testDefaultName()
- {
- EnterpriseBean<Pitbull> pitbull = EnterpriseBean.of(Pitbull.class, manager);
- assert pitbull.getName().equals("pitbull");
- }
-
- /**
- * An enterprise bean proxy implements all local interfaces of the EJB.
- */
- @Test(groups = { "specialization", "enterpriseBeans", "clientProxy", "stub" })
- @SpecAssertion(section = "3.3.8")
- public void testEnterpriseBeanProxyImplementsAllLocalInterfaces()
- {
- assert false;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanLifecycleTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanLifecycleTest.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanLifecycleTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,182 +0,0 @@
-package org.jboss.webbeans.test.ejb;
-
-import javax.webbeans.UnremovedException;
-
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.test.AbstractEjbEmbeddableTest;
-import org.jboss.webbeans.test.SpecAssertion;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.ejb.valid.GoodDoggie;
-import org.jboss.webbeans.test.ejb.valid.LocalGoodDoggie;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-/**
- * Sections
- *
- * 6.4. Lifecycle of stateful session enterprise Web beans
- * 6.5. Lifecycle of stateless session and singleton enterprise Web Beans
- * 6.9. Lifecycle of EJB beans
- *
- * Mostly overlapping with other tests...
- *
- * @author Nicklas Karlsson
- */
-
-@SpecVersion("20081206")
-public class EnterpriseBeanLifecycleTest extends AbstractEjbEmbeddableTest
-{
- /**
- * Initializes the EJB descriptors for the EJBs about to be used
- */
- @BeforeMethod
- public void setupEjbDescriptors()
- {
- addToEjbCache(GoodDoggie.class);
- addToEjbCache(LocalGoodDoggie.class);
- }
-
- /**
- * When the create() method is called, the Web Bean manager creates and
- * returns an enterprise bean proxy
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.4")
- public void testProxyCreated()
- {
- assert false;
- }
-
- /**
- * When the destroy() method is called, the Web Bean manager calls the Web
- * Bean remove method upon the proxy
- */
- @Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "stub"})
- @SpecAssertion(section = "6.4")
- public void testRemoveMethodCalled()
- {
- visited = false;
- activateDependentContext();
- EnterpriseBean<GoodDoggie> bean = EnterpriseBean.of(GoodDoggie.class, manager);
- manager.addBean(bean);
- GoodDoggie doggie = manager.getInstance(bean);
- bean.destroy(doggie);
- assert visited = true;
- }
-
- /**
- * For each remove method parameter, the Web Bean manager passes the object
- * returned by Manager.getInstanceByType()
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
- @SpecAssertion(section = "6.4")
- public void testFieldInjections()
- {
- assert false;
- }
-
- /**
- * If the enterprise Web Bean has no Web Bean remove method, the Web Bean
- * manager throws an UnremovedException.
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" }, expectedExceptions = UnremovedException.class)
- @SpecAssertion(section = "6.4")
- public void testNoRemoveMethodFails()
- {
- assert false;
- }
-
- /**
- * If the underlying EJB was already destroyed by direct invocation of a
- * remove method by the application, the Web Bean manager ignores the
- * instance, and is not required to call any remove method
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
- @SpecAssertion(section = "6.4")
- public void testNoRemoveMethodsCalledIfEnterpriseBeanAlreadyRemoved()
- {
- assert false;
- }
-
- /**
- * When the destroy() method is called, the Web Bean manager simply discards
- * the proxy and all EJB local object references.
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
- @SpecAssertion(section = "6.5")
- public void testProxyAndLocalObjectReferencesDiscardedForStatelessEnterpriseBeans()
- {
- assert false;
- }
-
- /**
- * The Web Bean manager initializes the values of all injected fields. For
- * each injected field, the Web Bean manager sets the value to the object
- * returned by Manager.getInstanceByType().
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.9")
- public void testFieldInjectionsOnRemoveMethods()
- {
- assert false;
- }
-
- /**
- * Next, if the EJB bean instance is an instance of a Web Bean, the Web Bean
- * manager initializes the values of any fields with initial values specified
- * in XML,
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.9")
- public void testInitXMLDefinedValuesOnWebWeanEnterpriseBeans()
- {
- assert false;
- }
-
- /**
- * Next, the Web Bean manager calls all initializer methods. For each
- * initializer method parameter, the Web Bean manager passes the object
- * returned by Manager.getInstanceByType().
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.9")
- public void testInitializerMethodsCalledWithCurrentParameterValues()
- {
- assert false;
- }
-
- /**
- * Finally, the Web Bean manager builds the interceptor and decorator stacks
- * for the instance
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "interceptors", "stub" })
- @SpecAssertion(section = "6.9")
- public void testInterceptorStackIsBuilt()
- {
- assert false;
- }
-
- /**
- * Finally, the Web Bean manager builds the interceptor and decorator stacks
- * for the instance
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "decorators", "stub" })
- @SpecAssertion(section = "6.9")
- public void testDecoratorStackIsBuilt()
- {
- assert false;
- }
-
- /**
- * When the EJB container destroys an instance of an EJB bean, the Web Bean
- * manager intercepts the @PreDestroy callback and destroys all dependent
- * objects, after the callback returns from the bean instance
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.9")
- public void testDependentObjectsDestroyed()
- {
- assert false;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanRemoveMethodTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanRemoveMethodTest.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanRemoveMethodTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,373 +0,0 @@
-package org.jboss.webbeans.test.ejb;
-
-import javax.webbeans.DefinitionException;
-import javax.webbeans.RequestScoped;
-import javax.webbeans.UnremovedException;
-
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.context.RequestContext;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecAssertion;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.ejb.invalid.Armant;
-import org.jboss.webbeans.test.ejb.invalid.GoldenRetriever;
-import org.jboss.webbeans.test.ejb.invalid.JackRussellTerrier;
-import org.jboss.webbeans.test.ejb.invalid.Pumi;
-import org.jboss.webbeans.test.ejb.invalid.Rottweiler;
-import org.jboss.webbeans.test.ejb.invalid.RussellTerrier;
-import org.jboss.webbeans.test.ejb.invalid.Saluki;
-import org.jboss.webbeans.test.ejb.invalid.Spitz;
-import org.jboss.webbeans.test.ejb.valid.GoodDoggie;
-import org.jboss.webbeans.test.ejb.valid.Koirus;
-import org.jboss.webbeans.test.ejb.valid.Toller;
-import org.jboss.webbeans.test.ejb.valid.WelshCorgie;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-/**
- * Sections
- *
- * 3.3.5. Web Bean remove methods 3.3.5.1. Declaring a Web Bean remove method
- * using annotations. 3.3.5.2. Declaring a Web Bean remove method using XML
- * 3.3.5.3. Remove method parameters
- *
- * @author Nicklas Karlsson
- */
-@SpecVersion("20081206")
-@SuppressWarnings("unused")
-public class EnterpriseBeanRemoveMethodTest extends AbstractTest
-{
-
- /**
- * Initializes the EJB descriptors for the EJBs about to be used
- */
- @BeforeMethod
- public void setupEjbDescriptors()
- {
- addToEjbCache(JackRussellTerrier.class);
- addToEjbCache(Pumi.class);
- addToEjbCache(RussellTerrier.class);
- addToEjbCache(Rottweiler.class);
- addToEjbCache(GoldenRetriever.class);
- addToEjbCache(Armant.class);
- addToEjbCache(Spitz.class);
- addToEjbCache(Toller.class);
- addToEjbCache(WelshCorgie.class);
- addToEjbCache(Koirus.class);
- addToEjbCache(GoodDoggie.class);
- }
-
- /**
- * EJB spec
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3.5")
- public void testStatelessEnterpriseBeansWithRemoveMethodsFails()
- {
- EnterpriseBean<Armant> bean = EnterpriseBean.of(Armant.class, manager);
- }
-
- /**
- * When the Web Bean manager destroys an enterprise Web Bean instance that is
- * an EJB stateful session bean, it calls the Web Bean remove method
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
- @SpecAssertion(section = "3.3.5")
- public void testStatefulEnterpriseBeanRemoveMethodCalledWhenDestroyedByManager()
- {
- EnterpriseBeanRemoveMethodTest.visited = false;
- EnterpriseBean<Toller> bena = EnterpriseBean.of(Toller.class, manager);
- RequestContext context = (RequestContext) manager.getContext(RequestScoped.class);
- Toller instance = context.get(bena, true);
- context.destroy();
- assert EnterpriseBeanRemoveMethodTest.visited;
- }
-
- /**
- * The Web Bean remove method is a remove method of the EJB stateful session
- * bean.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
- @SpecAssertion(section = "3.3.5")
- public void testWebBeanRemoveMethodIsEJBRemoveMethod()
- {
- assert false;
- }
-
- /**
- * If an enterprise Web Bean that is a stateful session bean and does not
- * have a Web Bean remove method declares any scope other than @Dependent, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3.5")
- public void testStatefulEnterpriseBeanWithoutRemoveMethodMustBeDependentScoped()
- {
- EnterpriseBean<Pumi> bean = EnterpriseBean.of(Pumi.class, manager);
- }
-
- /**
- * If an enterprise Web Bean that is a stateful session bean and does not
- * have a Web Bean remove method declares any scope other than @Dependent, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" })
- @SpecAssertion(section = "3.3.5")
- public void testStatefulEnterpriseBeanWithoutRemoveMethodMustBeDependentScoped2()
- {
- EnterpriseBean<WelshCorgie> bean = EnterpriseBean.of(WelshCorgie.class, manager);
- }
-
- /**
- * If an instance of an enterprise Web Bean that is a stateful session bean
- * and does not have a Web Bean remove method is not explicitly destroyed by
- * the application before the Web Bean manager attempts to destroy the
- * instance, an UnremovedException is thrown by the Web Bean manager
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "stub" }, expectedExceptions = UnremovedException.class)
- @SpecAssertion(section = "3.3.5")
- public void testStatefulEnterpriseBeanWithoutRemoveMethodMustBeRemovedByApplicationBeforeManager()
- {
- EnterpriseBean<Toller> bean = EnterpriseBean.of(Toller.class, manager);
- Toller instance = manager.getInstance(bean);
- RequestContext context = (RequestContext) manager.getContext(RequestScoped.class);
- context.destroy();
- }
-
- /**
- * If the scope is @Dependent, the application may call any EJB remove method
- * of an instance of the enterprise Web Bean, but then no parameters will be
- * passed to the method by the Web Bean manager
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
- @SpecAssertion(section = "3.3.5")
- public void applicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButNoParametersArePassed()
- {
- assert false;
- }
-
- /**
- * If the application directly calls an EJB remove method of an instance of
- * an enterprise Web Bean that is a stateful session bean and declares any
- * scope other than @Dependent, an UnsupportedOperationException is thrown.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" }, expectedExceptions = UnsupportedOperationException.class)
- @SpecAssertion(section = "3.3.5")
- public void applicationCannotCallRemoveMethodOnNonDependentScopedSessionEnterpriseBean()
- {
- assert false;
- }
-
- /**
- * If the application directly calls an EJB remove method of an instance of
- * an enterprise Web Bean that is a stateful session bean and has scope
- * @Dependent, the Web Bean manager ignores the instance when instead of
- * destroying it
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
- @SpecAssertion(section = "3.3.5")
- public void applicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButInstanceIsNotDestroyed()
- {
- assert false;
- }
-
- @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
- @SpecAssertion(section = "3.3.5")
- public void testApplicationRemoveMethodCallRemovesInstanceFromContext()
- {
- EnterpriseBean<Toller> bean = EnterpriseBean.of(Toller.class, manager);
- RequestContext context = (RequestContext) manager.getContext(RequestScoped.class);
- Toller instance = context.get(bean, true);
- instance.bye();
- instance = context.get(bean, false);
- assert instance == null;
- }
-
- /**
- * If an enterprise Web Bean defined using annotations does not explicitly
- * declare a Web Bean remove method using @Destructor, and exactly one remove
- * method that accepts no parameters exists, then that remove method is the
- * Web Bean remove method.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" })
- @SpecAssertion(section = { "3.3.5.1" })
- public void testEnterpriseBeanWithoutDestructorUsesNoArgsRemoveAnnotatedMethodAsWebBeansRemoveMethod()
- {
- EnterpriseBean<Toller> bean = EnterpriseBean.of(Toller.class, manager);
- assert "bye".equals(bean.getRemoveMethod().getName());
- }
-
- /**
- * Otherwise, if no remove method that accepts no parameters exists, or if
- * multiple remove methods that accept no parameters exist, the enterprise
- * Web Bean has no Web Bean remove method.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" })
- @SpecAssertion(section = { "3.3.5.1" })
- public void testEnterpriseBeanWithoutDestructorAndNoOrMultipleNoArgsRemoveMethodsHasNoWebBeansRemoveMethod()
- {
- EnterpriseBean<Koirus> bean = EnterpriseBean.of(Koirus.class, manager);
- assert bean.getRemoveMethod() == null;
- }
-
- /**
- * If an enterprise Web Bean defined using annotations has more than one
- * method annotated @Destructor, a DefinitionException is thrown by the Web
- * Bean manager at initialization time.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = { "3.3.5.1" })
- public void testMultipleDestructorAnnotatedMethodsFails()
- {
- EnterpriseBean<Rottweiler> bean = EnterpriseBean.of(Rottweiler.class, manager);
- }
-
- /**
- * If an enterprise Web Bean defined using annotations has a method annotated
- *
- * @Destructor, and that method is not an EJB remove method, a
- * DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = { "3.3.5.1" })
- public void testDestructorAnnotatedMethodNotRemoveAnnotatedFails()
- {
- EnterpriseBean<RussellTerrier> bean = EnterpriseBean.of(RussellTerrier.class, manager);
- }
-
- @Test(groups = { "enterpriseBeans", "removeMethod" })
- @SpecAssertion(section = { "3.3.5.1" })
- public void testDestructorAnnotatedSingleRemoveMethod()
- {
- EnterpriseBean<GoodDoggie> bean = EnterpriseBean.of(GoodDoggie.class, manager);
- }
-
- /**
- * If a Web Bean remove method is annotated @Initializer or @Produces, has a
- * parameter annotated @Disposes, or has a parameter annotated @Observes, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = { "3.3.5.1" })
- public void testRemoveMethodIsInitializerFails()
- {
- EnterpriseBean<Saluki> bean = EnterpriseBean.of(Saluki.class, manager);
- }
-
- /**
- * If a Web Bean remove method is annotated @Initializer or @Produces, has a
- * parameter annotated @Disposes, or has a parameter annotated @Observes, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = { "3.3.5.1" })
- public void testRemoveMethodIsProducerFails()
- {
- EnterpriseBean<Spitz> bean = EnterpriseBean.of(Spitz.class, manager);
- }
-
- /**
- * If a Web Bean remove method is annotated @Initializer or @Produces, has a
- * parameter annotated @Disposes, or has a parameter annotated @Observes, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = { "3.3.5.1" })
- public void testRemoveMethodWithDisposesParameterFails()
- {
- EnterpriseBean<GoldenRetriever> bean = EnterpriseBean.of(GoldenRetriever.class, manager);
- }
-
- /**
- * If a Web Bean remove method is annotated @Initializer or @Produces, has a
- * parameter annotated @Disposes, or has a parameter annotated @Observes, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = { "3.3.5.1" })
- public void testRemoveMethodWithObservesParameterFails()
- {
- EnterpriseBean<JackRussellTerrier> bean = EnterpriseBean.of(JackRussellTerrier.class, manager);
- }
-
- /**
- * If an enterprise Web Bean defined using XML does not explicitly declare a
- * Web Bean remove method using XML, and exactly one remove method that
- * accepts no parameters exists, then that remove method is the Web Bean
- * remove method
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
- @SpecAssertion(section = { "3.3.5.1", "3.3.5.2" })
- public void testXMLDefinedEnterpriseBeanWithoutDestructorUsesNoArgsRemoveAnnotatedMethodAsWebBeansRemoveMethod()
- {
- assert false;
- }
-
- /**
- * Otherwise, if no remove method that accepts no parameters exists, or if
- * multiple remove methods that accept no parameters exist, the enterprise
- * Web Bean has no Web Bean remove method.
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
- @SpecAssertion(section = { "3.3.5.1", "3.3.5.2" })
- public void testXMLDefinedEnterpriseBeanWithoutDestructorAndNoOrMultipleNoArgsRemoveMethodsHasNoWebBeansRemoveMethod()
- {
- assert false;
- }
-
- /**
- * If the implementation class of an enterprise Web Bean declared in XML does
- * not have an EJB remove method with the name and parameter types declared
- * in XML, a NonexistentMethodException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
- @SpecAssertion(section = "3.3.5.2")
- public void testXMLDefinedEnterpriseBeanWithoutMatchingRemoveMethodFails()
- {
- assert false;
- }
-
- /**
- * If an enterprise Web Bean defined using XML declares more than one Web
- * Bean remove method in XML, a DefinitionException is thrown by the Web Bean
- * manager at initialization time.
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
- @SpecAssertion(section = "3.3.5.2")
- public void testXMLDefinedEnterpriseBeanWithMultipleRemoveMethodsFails()
- {
- assert false;
- }
-
- /**
- * When a Web Bean remove method is declared in XML, the Web Bean manager
- * ignores binding annotations applied to the Java method parameters
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
- @SpecAssertion(section = "3.3.5.2")
- public void testXMLDefinedEnterpriseBeanIgnoresBindingAnnotationOnParameters()
- {
- assert false;
- }
-
- /**
- * If the Web Bean remove method has parameters, the Web Bean manager calls
- * Manager.getInstanceByType() to determine a value for each parameter and
- * calls the method with these parameter values.
- */
- @Test(groups = { "enterpriseBeans", "removeMethod", "stub" })
- @SpecAssertion(section = "3.3.5.3")
- public void testRemoveMethodParameterResolving()
- {
- assert false;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanSpecializationTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanSpecializationTest.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanSpecializationTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,154 +0,0 @@
-package org.jboss.webbeans.test.ejb;
-
-import javax.webbeans.DefinitionException;
-import javax.webbeans.DeploymentException;
-
-import org.jboss.webbeans.bean.EnterpriseBean;
-import org.jboss.webbeans.test.AbstractTest;
-import org.jboss.webbeans.test.SpecAssertion;
-import org.jboss.webbeans.test.SpecVersion;
-import org.jboss.webbeans.test.ejb.invalid.GreaterDane;
-import org.jboss.webbeans.test.ejb.valid.Hound;
-import org.jboss.webbeans.test.ejb.valid.HoundOfBaskerville;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-/**
- * Sections
- *
- * 3.3.6. Specializing an enterprise Web Bean
- *
- * @author Nicklas Karlsson
- */
-@SpecVersion("20081206")
-public class EnterpriseBeanSpecializationTest extends AbstractTest
-{
-
- @BeforeMethod
- public void setupEjbDescriptors()
- {
- addToEjbCache(HoundOfBaskerville.class);
- addToEjbCache(Hound.class);
- addToEjbCache(GreaterDane.class);
- }
-
- /**
- * If an implementation class of an enterprise Web Bean X defined using
- * annotations is annotated @Specializes, then the implementation class of X
- * must directly extend the implementation class of another enterprise Web
- * Bean Y defined using annotations. If the implementation class of X does
- * not directly extend the implementation class of another enterprise Web
- * Bean, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
- @Test(groups = { "specialization", "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.6")
- public void testAnnotationDefinedSpecializingEnterpriseBeanMustDirectlyExtendAnotherAnnotationDefinedEnterpriseBean()
- {
- assert false;
- }
-
- /**
- * X inherits all binding types of Y
- */
- @Test(groups = { "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testSpecializingBeanInheritsBindingTypes()
- {
- EnterpriseBean<Hound> hound = EnterpriseBean.of(Hound.class, manager);
- EnterpriseBean<HoundOfBaskerville> houndOfBaskerville = EnterpriseBean.of(HoundOfBaskerville.class, manager);
- assert compareBindingTypesOK(hound, houndOfBaskerville);
- }
-
- private boolean compareBindingTypesOK(EnterpriseBean<Hound> hound, EnterpriseBean<HoundOfBaskerville> houndOfBaskerville)
- {
- if (hound.getBindings().size() != houndOfBaskerville.getBindings().size())
- {
- return false;
- }
- if (!hound.getBindings().containsAll(houndOfBaskerville.getBindings()))
- {
- return false;
- }
- if (!houndOfBaskerville.getBindings().containsAll(hound.getBindings()))
- {
- return false;
- }
- return true;
- }
-
- /**
- * if Y has a name, X has the same name as Y.
- */
- @Test(groups = { "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testSpecializingBeanInheritsNameIfAny()
- {
- EnterpriseBean<HoundOfBaskerville> houndOfBaskerville = EnterpriseBean.of(HoundOfBaskerville.class, manager);
- assert houndOfBaskerville.getName().equals("Pongo");
- }
-
- /**
- * X must support all local interfaces supported by Y. Otherwise, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time.
- */
- @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testSpecializingNotSupportingLocalInterfacesOfSpecializedFails()
- {
- assert false;
- }
-
- /**
- * if Y supports a bean-class local view, X must also support a bean-class
- * local view. Otherwise, a DefinitionException is thrown by the Web Bean
- * manager at initialization time.
- */
- @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testSpecializingNotSupportingLocalViewOfSpecializedFails()
- {
- assert false;
- }
-
- /**
- * We say that X directly specializes Y, and we can be certain that Y will
- * never be instantiated or called by the Web Bean manager if X is enabled.
- */
- @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testEnabledSpecializationOverridesSpecialized()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testXMLDefinedSpecializationOnAnnotationDefinedBean()
- {
- assert false;
- }
-
- @Test(expectedExceptions = DeploymentException.class, groups = { "stub", "enterpriseBeans", "specialization" })
- @SpecAssertion(section = "3.3")
- public void testMultipleEnabledSpecializedEnterpriseBeanFails()
- {
- assert false;
- }
-
- @Test(expectedExceptions = DefinitionException.class, groups = { "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testAnnotationDefinedSpecializingEnterpriseBeanNotDirectlyExtendingAnnotationDefinedEnterpriseBeanFails()
- {
- EnterpriseBean.of(GreaterDane.class, manager);
- }
-
- @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
- @SpecAssertion(section = "3.3.6")
- public void testXMLDefinedSpecializingEnterpriseBeanNotImplementingAnnotationDefinedEnterpriseBeanFails()
- {
- assert false;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/GoodDoggie.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/GoodDoggie.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/GoodDoggie.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,17 +0,0 @@
-package org.jboss.webbeans.test.ejb.valid;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.webbeans.Destructor;
-
-import org.jboss.webbeans.test.ejb.EnterpriseBeanRemoveMethodTest;
-
-@Stateful
-public class GoodDoggie implements LocalGoodDoggie
-{
- @Destructor @Remove
- public void bye() {
- EnterpriseBeanRemoveMethodTest.visited = true;
- }
-
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Pitbull.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Pitbull.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Pitbull.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,21 +0,0 @@
-package org.jboss.webbeans.test.ejb.valid;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.webbeans.ApplicationScoped;
-import javax.webbeans.Destructor;
-import javax.webbeans.Named;
-
-import org.jboss.webbeans.test.ejb.EnterpriseBeanRemoveMethodTest;
-
-@Stateful
-@ApplicationScoped
-@Named
-public class Pitbull
-{
-
- @Remove @Destructor
- public void bye() {
- EnterpriseBeanRemoveMethodTest.visited = true;
- }
-}
Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Toller.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Toller.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/valid/Toller.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,17 +0,0 @@
-package org.jboss.webbeans.test.ejb.valid;
-
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.webbeans.RequestScoped;
-
-import org.jboss.webbeans.test.ejb.EnterpriseBeanRemoveMethodTest;
-
-@Stateful
-@RequestScoped
-public class Toller
-{
- @Remove
- public void bye() {
- EnterpriseBeanRemoveMethodTest.visited = true;
- }
-}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/BeansImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/BeansImpl.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/BeansImpl.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -13,6 +13,7 @@
import org.jboss.webbeans.bean.SimpleBean;
import org.jboss.webbeans.ejb.spi.EjbDescriptor;
import org.jboss.webbeans.tck.api.Beans;
+import org.jboss.webbeans.test.mock.MockEjbDescriptor;
import org.jboss.webbeans.util.Reflections;
/**
@@ -57,6 +58,7 @@
public <T> Bean<T> createEnterpriseBean(Class<T> clazz)
{
+ CurrentManager.rootManager().getEjbDescriptorCache().add(MockEjbDescriptor.of(clazz));
return EnterpriseBean.of(clazz, CurrentManager.rootManager());
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ContextsImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ContextsImpl.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ContextsImpl.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -1,5 +1,6 @@
package org.jboss.webbeans.test.tck;
+import org.jboss.webbeans.context.AbstractBeanMapContext;
import org.jboss.webbeans.context.AbstractContext;
import org.jboss.webbeans.context.DependentContext;
import org.jboss.webbeans.context.RequestContext;
@@ -28,6 +29,16 @@
return DependentContext.INSTANCE;
}
+ public void destroyContext(AbstractContext context)
+ {
+ if (context instanceof AbstractBeanMapContext)
+ {
+ ((AbstractBeanMapContext) context).destroy();
+ }
+ else
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
-
}
Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Contexts.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Contexts.java 2009-01-17 18:55:42 UTC (rev 1042)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Contexts.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -19,26 +19,35 @@
*
* @param context The context to set active
*/
- void setActive(T context);
+ public void setActive(T context);
/**
* Sets the specified context as inactive
*
* @param context The context to set inactive
*/
- void setInactive(T context);
+ public void setInactive(T context);
/**
* Creates a new request context
*
* @return The new request context
*/
- T getRequestContext();
+ public T getRequestContext();
/**
* Returns the default dependent context
*
* @return the dependent context
*/
- T getDependentContext();
+ public T getDependentContext();
+
+ /**
+ * Destroy the context. This operation is not well defined by the Web Beans
+ * specification and is implementation dependent.
+ *
+ * @param context
+ */
+ public void destroyContext(T context);
+
}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractEjbEmbeddableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractEjbEmbeddableTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractEjbEmbeddableTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.tck.tests;
+
+public class AbstractEjbEmbeddableTest extends AbstractTest
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/AbstractEjbEmbeddableTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateless;
+import javax.webbeans.Destructor;
+
+@Stateless
+public class Armant_Broken
+{
+ @Destructor @Remove
+ public void bye() {
+
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Armant_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Beagle_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Beagle_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Beagle_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.RequestScoped;
+
+@Stateless
+@RequestScoped
+class Beagle_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Beagle_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Boxer_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Boxer_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Boxer_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.ConversationScoped;
+
+@Stateless
+@ConversationScoped
+class Boxer_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Boxer_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Bullmastiff_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Bullmastiff_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Bullmastiff_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.SessionScoped;
+
+@Stateless
+@SessionScoped
+class Bullmastiff_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Bullmastiff_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Dachshund_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Dachshund_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Dachshund_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.ApplicationScoped;
+
+@Stateless
+@ApplicationScoped
+class Dachshund_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Dachshund_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanDeclarationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanDeclarationTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanDeclarationTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,363 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.DefinitionException;
+import javax.webbeans.DeploymentException;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+/**
+ * Sections
+ *
+ * 3.3. Enterprise Web Beans
+ * 3.3.1. Which EJBs are enterprise Web Beans?
+ * 3.3.2. API types of an enterprise Web Bean
+ * 3.3.3. Declaring an enterprise Web Bean using annotations
+ * 3.3.4. Declaring an enterprise Web Bean using XML
+ *
+ * @author Nicklas Karlsson
+ */
+@SpecVersion("20081206")
+public class EnterpriseBeanDeclarationTest extends AbstractTest
+{
+
+ /**
+ * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
+ * If an enterprise Web Bean specifies an illegal scope, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+ @Test(groups = { "enterpriseBeans" })
+ @SpecAssertion(section = "3.3")
+ public void testStatelessWithDependentScopeOK()
+ {
+ deployBeans(Giraffe.class);
+ }
+
+ /**
+ * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
+ * If an enterprise Web Bean specifies an illegal scope, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+ @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testStatelessWithRequestScopeFails()
+ {
+ deployBeans(Beagle_Broken.class);
+ }
+
+ /**
+ * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
+ * If an enterprise Web Bean specifies an illegal scope, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+
+ @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testStatelessWithConversationScopeFails()
+ {
+ deployBeans(Boxer_Broken.class);
+ }
+
+ /**
+ * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
+ * If an enterprise Web Bean specifies an illegal scope, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+ @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testStatelessWithSessionScopeFails()
+ {
+ deployBeans(Bullmastiff_Broken.class);
+ }
+
+ /**
+ * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
+ * If an enterprise Web Bean specifies an illegal scope, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+ @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testStatelessWithApplicationScopeFails()
+ {
+ deployBeans(Dachshund_Broken.class);
+ }
+
+ /**
+ * An EJB singleton bean must belong to either the @ApplicationScoped scope
+ * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
+ * illegal scope, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "enterpriseBeans" ,"broken"})
+ @SpecAssertion(section = "3.3")
+ public void testSingletonWithDependentScopeOK()
+ {
+ deployBeans(Labrador.class);
+ assert false;
+ }
+
+ /**
+ * An EJB singleton bean must belong to either the @ApplicationScoped scope
+ * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
+ * illegal scope, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "enterpriseBeans" , "broken"}, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testSingletonWithRequestScopeFails()
+ {
+ deployBeans(Greyhound_Broken.class);
+ assert false;
+ }
+
+ /**
+ * An EJB singleton bean must belong to either the @ApplicationScoped scope
+ * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
+ * illegal scope, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "enterpriseBeans", "broken" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testSingletonWithConversationScopeFails()
+ {
+ deployBeans(Husky_Broken.class);
+ assert false;
+ }
+
+ /**
+ * An EJB singleton bean must belong to either the @ApplicationScoped scope
+ * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
+ * illegal scope, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "enterpriseBeans" , "broken"}, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testSingletonWithSessionScopeFails()
+ {
+ deployBeans(IrishTerrier_Broken.class);
+ }
+
+ /**
+ * An EJB singleton bean must belong to either the @ApplicationScoped scope
+ * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
+ * illegal scope, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "enterpriseBeans" , "broken" })
+ @SpecAssertion(section = "3.3")
+ public void testSingletonWithApplicationScopeOK()
+ {
+ deployBeans(Laika.class);
+ }
+
+ /**
+ * However, in any deployment, there may be at most one most specialized
+ * enabled enterprise Web Bean for any particular EJB enterprise bean.
+ * Therefore, for each distinct EJB name in a module, there is at most one
+ * Web Bean that may be called at runtime. If there is more than one most
+ * specialized enabled enterprise Web Bean for a particular EJB enterprise
+ * bean, a DeploymentException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(groups = { "enterpriseBeans", "stub" }, expectedExceptions = DeploymentException.class)
+ @SpecAssertion(section = "3.3")
+ public void testOnlyOneEnabledSpecializedEnterpriseBeanForImplmentation()
+ {
+ assert false;
+ }
+
+ /**
+ * If the implementation class of an enterprise Web Bean is annotated @Interceptor
+ * or @Decorator, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testEnterpriseBeanInterceptorFails()
+ {
+ deployBeans(Pug_Broken.class);
+ }
+
+ /**
+ * If the implementation class of an enterprise Web Bean is annotated @Interceptor
+ * or @Decorator, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3")
+ public void testEnterpriseBeanDecoratorFails()
+ {
+ deployBeans(Pekingese_Broken.class);
+ }
+
+ /**
+ * Only one Web Bean per implementation class may be defined using
+ * annotations.
+ */
+ @Test(expectedExceptions = DefinitionException.class, groups = { "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3")
+ public void testMultipleAnnotationDefinedEnterpriseBeansWithSameImplementationClassFails()
+ {
+ // TODO: testable?
+ assert false;
+ }
+
+ /**
+ * Note that multiple enterprise Web Beans may share the same implementation
+ * class. This occurs when Web Beans are defined using XML
+ */
+ @Test(groups = { "webbeansxml", "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3")
+ public void testMultipleXMLDefinedEnterpriseBeansWithSameImplementationClassOK()
+ {
+ assert false;
+ }
+
+ /**
+ * All session beans exposing an EJB 3.x client view and declared via an EJB
+ * component defining annotation on the EJB bean class are Web Beans, and
+ * thus no special declaration is required.
+ */
+ @Test(groups = { "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3.1")
+ public void testAnnotatedEnterpriseBean()
+ {
+ // TODO: dupe?
+ assert false;
+ }
+
+ /**
+ * Additional enterprise Web Beans for these EJBs may be defined using XML,
+ * by specifying the bean class in web-beans.xml.
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "stub" })
+ @SpecAssertion(section = "3.3.1")
+ public void testAnnotatedEnterpriseBeanComplementedWithXML()
+ {
+ // TODO dupe?
+ assert false;
+ }
+
+ /**
+ * All session beans exposing an EJB 3.x client view and declared in
+ * ejb-jar.xml are also Web Beans.
+ */
+ @Test(groups = { "enterpriseBeans", "ejbjarxml", "stub" })
+ @SpecAssertion(section = "3.3.1")
+ public void testEJBJARDefinedEnterpriseBean()
+ {
+ // TODO dupe?
+ assert false;
+ }
+
+ /**
+ * Additional enterprise Web Beans for these EJBs may be defined using XML,
+ * by specifying the bean class and EJB name in web-beans.xml
+ */
+ @Test(groups = { "enterpriseBeans", "ejbjarxml", "webbeansxml", "stub" })
+ @SpecAssertion(section = "3.3.1")
+ public void testEJBJARDefinedEnterpriseBeanComplementedWithXML()
+ {
+ // TODO dupe?
+ assert false;
+ }
+
+ /**
+ * The set of API types for an enterprise Web Bean contains all local
+ * interfaces of the bean that do not have wildcard type parameters or type
+ * variables and their superinterfaces
+ */
+ @Test(groups = { "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3.2")
+ public void testAPITypesAreLocalInterfacesWithoutWildcardTypesOrTypeVariablesWithSuperInterfaces()
+ {
+ assert false;
+ }
+
+ /**
+ * If the EJB bean has a bean class local view and the bean class is not a
+ * parameterized type, the set of API types contains the bean class and all
+ * superclasses
+ */
+ @Test(groups = { "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3.2")
+ public void testEnterpriseBeanWithLocalViewAndParameterizedTypeIncludesBeanClassAndSuperclassesInAPITypes()
+ {
+ assert false;
+ }
+
+ /**
+ * In addition, java.lang.Object is an API type of every enterprise Web Bean.
+ */
+ @Test(groups = "enterpriseBeans")
+ @SpecAssertion(section = "3.3.2")
+ public void testObjectIsInAPITypes()
+ {
+ assert createEnterpriseBean(Laika.class).getTypes().contains(Object.class);
+ }
+
+ /**
+ * Remote interfaces are not included in the set of API types.
+ */
+ @Test(groups = { "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3.2")
+ public void testRemoteInterfacesAreNotInAPITypes()
+ {
+ assert false;
+ }
+
+ /**
+ * Enterprise Web Beans may be declared in web-beans.xml using the bean class
+ * name (for EJBs defined using a component- defining annotation) or bean
+ * class and EJB name (for EJBs defined in ejb-jar.xml). The ejbName
+ * attribute declares the EJB name of an EJB defined in ejb-jar.xml
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "ejbjarxml", "stub" })
+ @SpecAssertion(section = "3.3")
+ public void testXMLFilesEJBNameUsage()
+ {
+ assert false;
+ }
+
+ /**
+ * Enterprise Web Beans may not be message-driven beans. If an enterprise Web
+ * Bean declared in XML is a message-driven bean, a DefinitionException is
+ * thrown by the Web Bean manager at initialization time.
+ */
+ @Test(expectedExceptions = DefinitionException.class, groups = {"enterpriseBeans", "broken"})
+ @SpecAssertion(section = "3.3")
+ public void testMessageDrivenBeansNotOK()
+ {
+ deployBeans(Leopard.class);
+ }
+
+ /**
+ * The default name for an enterprise Web Bean is the unqualified class name
+ * of the Web Bean implementation class, after converting the first character
+ * to lower case.
+ */
+ @Test(groups = "enterpriseBeans")
+ @SpecAssertion(section = "3.3.7")
+ public void testDefaultName()
+ {
+ assert createEnterpriseBean(Pitbull.class).getName().equals("pitbull");
+ }
+
+ /**
+ * An enterprise bean proxy implements all local interfaces of the EJB.
+ */
+ @Test(groups = { "specialization", "enterpriseBeans", "clientProxy", "stub" })
+ @SpecAssertion(section = "3.3.8")
+ public void testEnterpriseBeanProxyImplementsAllLocalInterfaces()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanDeclarationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanLifecycleTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanLifecycleTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,181 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import java.util.Set;
+
+import javax.webbeans.UnremovedException;
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.tests.AbstractEjbEmbeddableTest;
+import org.testng.annotations.Test;
+
+/**
+ * Sections
+ *
+ * 6.4. Lifecycle of stateful session enterprise Web beans
+ * 6.5. Lifecycle of stateless session and singleton enterprise Web Beans
+ * 6.9. Lifecycle of EJB beans
+ *
+ * Mostly overlapping with other tests...
+ *
+ * @author Nicklas Karlsson
+ */
+
+@SpecVersion("20081206")
+public class EnterpriseBeanLifecycleTest extends AbstractEjbEmbeddableTest
+{
+
+ /**
+ * When the create() method is called, the Web Bean manager creates and
+ * returns an enterprise bean proxy
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
+ @SpecAssertion(section = "6.4")
+ public void testProxyCreated()
+ {
+ assert false;
+ }
+
+ /**
+ * When the destroy() method is called, the Web Bean manager calls the Web
+ * Bean remove method upon the proxy
+ */
+ @Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "stub"})
+ @SpecAssertion(section = "6.4")
+ public void testRemoveMethodCalled() throws Exception
+ {
+ GoodDoggie.destructorCalled = false;
+ deployBeans(GoodDoggie.class);
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ Set<Bean<LocalGoodDoggie>> goodDoggieBeans = manager.resolveByType(LocalGoodDoggie.class);
+ assert goodDoggieBeans.size() == 1;
+ Bean<LocalGoodDoggie> bean = goodDoggieBeans.iterator().next();
+ LocalGoodDoggie doggie = manager.getInstance(bean);
+ bean.destroy(doggie);
+ }
+
+ }.run();
+ }
+
+ /**
+ * For each remove method parameter, the Web Bean manager passes the object
+ * returned by Manager.getInstanceByType()
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
+ @SpecAssertion(section = "6.4")
+ public void testFieldInjections()
+ {
+ assert false;
+ }
+
+ /**
+ * If the enterprise Web Bean has no Web Bean remove method, the Web Bean
+ * manager throws an UnremovedException.
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" }, expectedExceptions = UnremovedException.class)
+ @SpecAssertion(section = "6.4")
+ public void testNoRemoveMethodFails()
+ {
+ assert false;
+ }
+
+ /**
+ * If the underlying EJB was already destroyed by direct invocation of a
+ * remove method by the application, the Web Bean manager ignores the
+ * instance, and is not required to call any remove method
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
+ @SpecAssertion(section = "6.4")
+ public void testNoRemoveMethodsCalledIfEnterpriseBeanAlreadyRemoved()
+ {
+ assert false;
+ }
+
+ /**
+ * When the destroy() method is called, the Web Bean manager simply discards
+ * the proxy and all EJB local object references.
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
+ @SpecAssertion(section = "6.5")
+ public void testProxyAndLocalObjectReferencesDiscardedForStatelessEnterpriseBeans()
+ {
+ assert false;
+ }
+
+ /**
+ * The Web Bean manager initializes the values of all injected fields. For
+ * each injected field, the Web Bean manager sets the value to the object
+ * returned by Manager.getInstanceByType().
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
+ @SpecAssertion(section = "6.9")
+ public void testFieldInjectionsOnRemoveMethods()
+ {
+ assert false;
+ }
+
+ /**
+ * Next, if the EJB bean instance is an instance of a Web Bean, the Web Bean
+ * manager initializes the values of any fields with initial values specified
+ * in XML,
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
+ @SpecAssertion(section = "6.9")
+ public void testInitXMLDefinedValuesOnWebWeanEnterpriseBeans()
+ {
+ assert false;
+ }
+
+ /**
+ * Next, the Web Bean manager calls all initializer methods. For each
+ * initializer method parameter, the Web Bean manager passes the object
+ * returned by Manager.getInstanceByType().
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
+ @SpecAssertion(section = "6.9")
+ public void testInitializerMethodsCalledWithCurrentParameterValues()
+ {
+ assert false;
+ }
+
+ /**
+ * Finally, the Web Bean manager builds the interceptor and decorator stacks
+ * for the instance
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "interceptors", "stub" })
+ @SpecAssertion(section = "6.9")
+ public void testInterceptorStackIsBuilt()
+ {
+ assert false;
+ }
+
+ /**
+ * Finally, the Web Bean manager builds the interceptor and decorator stacks
+ * for the instance
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "decorators", "stub" })
+ @SpecAssertion(section = "6.9")
+ public void testDecoratorStackIsBuilt()
+ {
+ assert false;
+ }
+
+ /**
+ * When the EJB container destroys an instance of an EJB bean, the Web Bean
+ * manager intercepts the @PreDestroy callback and destroys all dependent
+ * objects, after the callback returns from the bean instance
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
+ @SpecAssertion(section = "6.9")
+ public void testDependentObjectsDestroyed()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanLifecycleTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,346 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
+
+import javax.webbeans.DefinitionException;
+import javax.webbeans.UnremovedException;
+import javax.webbeans.manager.Bean;
+import javax.webbeans.manager.Context;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+/**
+ * Sections
+ *
+ * 3.3.5. Web Bean remove methods 3.3.5.1. Declaring a Web Bean remove method
+ * using annotations. 3.3.5.2. Declaring a Web Bean remove method using XML
+ * 3.3.5.3. Remove method parameters
+ *
+ * @author Nicklas Karlsson
+ */
+@SpecVersion("20081206")
+public class EnterpriseBeanRemoveMethodTest extends AbstractTest
+{
+
+ /**
+ * EJB spec
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3.5")
+ public void testStatelessEnterpriseBeansWithRemoveMethodsFails()
+ {
+ deployBeans(Armant_Broken.class);
+ }
+
+ /**
+ * When the Web Bean manager destroys an enterprise Web Bean instance that is
+ * an EJB stateful session bean, it calls the Web Bean remove method
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
+ @SpecAssertion(section = "3.3.5")
+ public void testStatefulEnterpriseBeanRemoveMethodCalledWhenDestroyedByManager()
+ {
+ Toller.removeCalled = false;
+ Bean<Toller> bean = createEnterpriseBean(Toller.class);
+ Context context = configuration().getContexts().getRequestContext();
+ context.get(bean, true);
+ configuration().getContexts().destroyContext(context);
+ assert Toller.removeCalled;
+ }
+
+ /**
+ * The Web Bean remove method is a remove method of the EJB stateful session
+ * bean.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
+ @SpecAssertion(section = "3.3.5")
+ public void testWebBeanRemoveMethodIsEJBRemoveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * If an enterprise Web Bean that is a stateful session bean and does not
+ * have a Web Bean remove method declares any scope other than @Dependent, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "3.3.5")
+ public void testStatefulEnterpriseBeanWithoutRemoveMethodMustBeDependentScoped()
+ {
+ deployBeans(Pumi_Broken.class);
+ }
+
+ /**
+ * If an enterprise Web Bean that is a stateful session bean and does not
+ * have a Web Bean remove method declares any scope other than @Dependent, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" })
+ @SpecAssertion(section = "3.3.5")
+ public void testStatefulEnterpriseBeanWithoutRemoveMethodMustBeDependentScoped2()
+ {
+ createEnterpriseBean(WelshCorgie.class);
+ }
+
+ /**
+ * If an instance of an enterprise Web Bean that is a stateful session bean
+ * and does not have a Web Bean remove method is not explicitly destroyed by
+ * the application before the Web Bean manager attempts to destroy the
+ * instance, an UnremovedException is thrown by the Web Bean manager
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "stub" }, expectedExceptions = UnremovedException.class)
+ @SpecAssertion(section = "3.3.5")
+ public void testStatefulEnterpriseBeanWithoutRemoveMethodMustBeRemovedByApplicationBeforeManager()
+ {
+ Bean<Toller> bean = createEnterpriseBean(Toller.class);
+ manager.getInstance(bean);
+ configuration().getContexts().destroyContext(configuration().getContexts().getRequestContext());
+ }
+
+ /**
+ * If the scope is @Dependent, the application may call any EJB remove method
+ * of an instance of the enterprise Web Bean, but then no parameters will be
+ * passed to the method by the Web Bean manager
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
+ @SpecAssertion(section = "3.3.5")
+ public void applicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButNoParametersArePassed()
+ {
+ assert false;
+ }
+
+ /**
+ * If the application directly calls an EJB remove method of an instance of
+ * an enterprise Web Bean that is a stateful session bean and declares any
+ * scope other than @Dependent, an UnsupportedOperationException is thrown.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" }, expectedExceptions = UnsupportedOperationException.class)
+ @SpecAssertion(section = "3.3.5")
+ public void applicationCannotCallRemoveMethodOnNonDependentScopedSessionEnterpriseBean()
+ {
+ assert false;
+ }
+
+ /**
+ * If the application directly calls an EJB remove method of an instance of
+ * an enterprise Web Bean that is a stateful session bean and has scope
+ * @Dependent, the Web Bean manager ignores the instance when instead of
+ * destroying it
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
+ @SpecAssertion(section = "3.3.5")
+ public void applicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButInstanceIsNotDestroyed()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
+ @SpecAssertion(section = "3.3.5")
+ public void testApplicationRemoveMethodCallRemovesInstanceFromContext()
+ {
+ Bean<Toller> bean = createEnterpriseBean(Toller.class);
+ Context context = configuration().getContexts().getRequestContext();
+ Toller instance = context.get(bean, true);
+ instance.bye();
+ instance = context.get(bean, false);
+ assert instance == null;
+ }
+
+ /**
+ * If an enterprise Web Bean defined using annotations does not explicitly
+ * declare a Web Bean remove method using @Destructor, and exactly one remove
+ * method that accepts no parameters exists, then that remove method is the
+ * Web Bean remove method.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" })
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testEnterpriseBeanWithoutDestructorUsesNoArgsRemoveAnnotatedMethodAsWebBeansRemoveMethod()
+ {
+ Toller.removeCalled = true;
+ Bean<Toller> bean = createEnterpriseBean(Toller.class);
+ bean.create();
+ configuration().getContexts().destroyContext(configuration().getContexts().getRequestContext());
+ assert Toller.removeCalled;
+ }
+
+ /**
+ * Otherwise, if no remove method that accepts no parameters exists, or if
+ * multiple remove methods that accept no parameters exist, the enterprise
+ * Web Bean has no Web Bean remove method.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "broken" })
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testEnterpriseBeanWithoutDestructorAndNoOrMultipleNoArgsRemoveMethodsHasNoWebBeansRemoveMethod()
+ {
+ Koirus.removeCalled = false;
+ Bean<Koirus> bean = createEnterpriseBean(Koirus.class);
+ bean.create();
+ configuration().getContexts().destroyContext(configuration().getContexts().getDependentContext());
+ assert Koirus.removeCalled;
+ }
+
+ /**
+ * If an enterprise Web Bean defined using annotations has more than one
+ * method annotated @Destructor, a DefinitionException is thrown by the Web
+ * Bean manager at initialization time.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testMultipleDestructorAnnotatedMethodsFails()
+ {
+ createEnterpriseBean(Rottweiler.class);
+ }
+
+ /**
+ * If an enterprise Web Bean defined using annotations has a method annotated
+ *
+ * @Destructor, and that method is not an EJB remove method, a
+ * DefinitionException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testDestructorAnnotatedMethodNotRemoveAnnotatedFails()
+ {
+ createEnterpriseBean(RussellTerrier.class);
+ }
+
+ @Test(groups = { "enterpriseBeans", "removeMethod" })
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testDestructorAnnotatedSingleRemoveMethod()
+ {
+ createEnterpriseBean(GoodDoggie.class);
+ }
+
+ /**
+ * If a Web Bean remove method is annotated @Initializer or @Produces, has a
+ * parameter annotated @Disposes, or has a parameter annotated @Observes, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testRemoveMethodIsInitializerFails()
+ {
+ createEnterpriseBean(Saluki.class);
+ }
+
+ /**
+ * If a Web Bean remove method is annotated @Initializer or @Produces, has a
+ * parameter annotated @Disposes, or has a parameter annotated @Observes, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testRemoveMethodIsProducerFails()
+ {
+ createEnterpriseBean(Spitz.class);
+ }
+
+ /**
+ * If a Web Bean remove method is annotated @Initializer or @Produces, has a
+ * parameter annotated @Disposes, or has a parameter annotated @Observes, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testRemoveMethodWithDisposesParameterFails()
+ {
+ createEnterpriseBean(GoldenRetriever.class);
+ }
+
+ /**
+ * If a Web Bean remove method is annotated @Initializer or @Produces, has a
+ * parameter annotated @Disposes, or has a parameter annotated @Observes, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = { "3.3.5.1" })
+ public void testRemoveMethodWithObservesParameterFails()
+ {
+ createEnterpriseBean(JackRussellTerrier.class);
+ }
+
+ /**
+ * If an enterprise Web Bean defined using XML does not explicitly declare a
+ * Web Bean remove method using XML, and exactly one remove method that
+ * accepts no parameters exists, then that remove method is the Web Bean
+ * remove method
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
+ @SpecAssertion(section = { "3.3.5.1", "3.3.5.2" })
+ public void testXMLDefinedEnterpriseBeanWithoutDestructorUsesNoArgsRemoveAnnotatedMethodAsWebBeansRemoveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * Otherwise, if no remove method that accepts no parameters exists, or if
+ * multiple remove methods that accept no parameters exist, the enterprise
+ * Web Bean has no Web Bean remove method.
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
+ @SpecAssertion(section = { "3.3.5.1", "3.3.5.2" })
+ public void testXMLDefinedEnterpriseBeanWithoutDestructorAndNoOrMultipleNoArgsRemoveMethodsHasNoWebBeansRemoveMethod()
+ {
+ assert false;
+ }
+
+ /**
+ * If the implementation class of an enterprise Web Bean declared in XML does
+ * not have an EJB remove method with the name and parameter types declared
+ * in XML, a NonexistentMethodException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
+ @SpecAssertion(section = "3.3.5.2")
+ public void testXMLDefinedEnterpriseBeanWithoutMatchingRemoveMethodFails()
+ {
+ assert false;
+ }
+
+ /**
+ * If an enterprise Web Bean defined using XML declares more than one Web
+ * Bean remove method in XML, a DefinitionException is thrown by the Web Bean
+ * manager at initialization time.
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
+ @SpecAssertion(section = "3.3.5.2")
+ public void testXMLDefinedEnterpriseBeanWithMultipleRemoveMethodsFails()
+ {
+ assert false;
+ }
+
+ /**
+ * When a Web Bean remove method is declared in XML, the Web Bean manager
+ * ignores binding annotations applied to the Java method parameters
+ */
+ @Test(groups = { "enterpriseBeans", "webbeansxml", "removeMethod", "stub" })
+ @SpecAssertion(section = "3.3.5.2")
+ public void testXMLDefinedEnterpriseBeanIgnoresBindingAnnotationOnParameters()
+ {
+ assert false;
+ }
+
+ /**
+ * If the Web Bean remove method has parameters, the Web Bean manager calls
+ * Manager.getInstanceByType() to determine a value for each parameter and
+ * calls the method with these parameter values.
+ */
+ @Test(groups = { "enterpriseBeans", "removeMethod", "stub" })
+ @SpecAssertion(section = "3.3.5.3")
+ public void testRemoveMethodParameterResolving()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanSpecializationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanSpecializationTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanSpecializationTest.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,144 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.DefinitionException;
+import javax.webbeans.DeploymentException;
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+/**
+ * Sections
+ *
+ * 3.3.6. Specializing an enterprise Web Bean
+ *
+ * @author Nicklas Karlsson
+ */
+@SpecVersion("20081206")
+public class EnterpriseBeanSpecializationTest extends AbstractTest
+{
+
+ /**
+ * If an implementation class of an enterprise Web Bean X defined using
+ * annotations is annotated @Specializes, then the implementation class of X
+ * must directly extend the implementation class of another enterprise Web
+ * Bean Y defined using annotations. If the implementation class of X does
+ * not directly extend the implementation class of another enterprise Web
+ * Bean, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time
+ */
+ @Test(groups = { "specialization", "enterpriseBeans", "stub" })
+ @SpecAssertion(section = "3.3.6")
+ public void testAnnotationDefinedSpecializingEnterpriseBeanMustDirectlyExtendAnotherAnnotationDefinedEnterpriseBean()
+ {
+ assert false;
+ }
+
+ /**
+ * X inherits all binding types of Y
+ */
+ @Test(groups = { "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testSpecializingBeanInheritsBindingTypes()
+ {
+ Bean<Hound> hound = createEnterpriseBean(Hound.class);
+ Bean<HoundOfBaskerville> houndOfBaskerville = createEnterpriseBean(HoundOfBaskerville.class);
+ assert compareBindingTypesOK(hound, houndOfBaskerville);
+ }
+
+ private boolean compareBindingTypesOK(Bean<Hound> hound, Bean<HoundOfBaskerville> houndOfBaskerville)
+ {
+ if (hound.getBindings().size() != houndOfBaskerville.getBindings().size())
+ {
+ return false;
+ }
+ if (!hound.getBindings().containsAll(houndOfBaskerville.getBindings()))
+ {
+ return false;
+ }
+ if (!houndOfBaskerville.getBindings().containsAll(hound.getBindings()))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * if Y has a name, X has the same name as Y.
+ */
+ @Test(groups = { "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testSpecializingBeanInheritsNameIfAny()
+ {
+ // Create the specialized class
+ createEnterpriseBean(Hound.class);
+ Bean<HoundOfBaskerville> houndOfBaskerville = createEnterpriseBean(HoundOfBaskerville.class);
+ assert houndOfBaskerville.getName().equals("Pongo");
+ }
+
+ /**
+ * X must support all local interfaces supported by Y. Otherwise, a
+ * DefinitionException is thrown by the Web Bean manager at initialization
+ * time.
+ */
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testSpecializingNotSupportingLocalInterfacesOfSpecializedFails()
+ {
+ assert false;
+ }
+
+ /**
+ * if Y supports a bean-class local view, X must also support a bean-class
+ * local view. Otherwise, a DefinitionException is thrown by the Web Bean
+ * manager at initialization time.
+ */
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testSpecializingNotSupportingLocalViewOfSpecializedFails()
+ {
+ assert false;
+ }
+
+ /**
+ * We say that X directly specializes Y, and we can be certain that Y will
+ * never be instantiated or called by the Web Bean manager if X is enabled.
+ */
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testEnabledSpecializationOverridesSpecialized()
+ {
+ assert false;
+ }
+
+ @Test(groups = { "stub", "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testXMLDefinedSpecializationOnAnnotationDefinedBean()
+ {
+ assert false;
+ }
+
+ @Test(expectedExceptions = DeploymentException.class, groups = { "stub", "enterpriseBeans", "specialization" })
+ @SpecAssertion(section = "3.3")
+ public void testMultipleEnabledSpecializedEnterpriseBeanFails()
+ {
+ assert false;
+ }
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testAnnotationDefinedSpecializingEnterpriseBeanNotDirectlyExtendingAnnotationDefinedEnterpriseBeanFails()
+ {
+ createEnterpriseBean(GreaterDane.class);
+ }
+
+ @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "specialization", "enterpriseBeans" })
+ @SpecAssertion(section = "3.3.6")
+ public void testXMLDefinedSpecializingEnterpriseBeanNotImplementingAnnotationDefinedEnterpriseBeanFails()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/EnterpriseBeanSpecializationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Giraffe.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Giraffe.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Giraffe.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+
+@Stateless
+class Giraffe
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Giraffe.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoldenRetriever.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoldenRetriever.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoldenRetriever.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Destructor;
+import javax.webbeans.Disposes;
+import javax.webbeans.RequestScoped;
+
+@Stateful
+@RequestScoped
+class GoldenRetriever
+{
+ @Remove @Destructor
+ public void bye(@Disposes Object something) {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoldenRetriever.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoodDoggie.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoodDoggie.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoodDoggie.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Destructor;
+
+@Stateful
+class GoodDoggie implements LocalGoodDoggie
+{
+
+ public static boolean destructorCalled = false;
+
+ @Destructor @Remove
+ public void bye() {
+ destructorCalled = true;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GoodDoggie.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreatDane.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreatDane.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreatDane.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,7 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+
+class GreatDane
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreatDane.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreaterDane.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreaterDane.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreaterDane.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.Specializes;
+
+@Specializes
+@Stateless
+class GreaterDane extends GreatDane
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/GreaterDane.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Greyhound_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Greyhound_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Greyhound_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.RequestScoped;
+
+//@Singleton
+@RequestScoped
+class Greyhound_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Greyhound_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Hound.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Hound.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Hound.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Named;
+
+@Stateful
+@Tame
+@Named("Pongo")
+class Hound
+{
+ @Remove
+ public void bye() {
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Hound.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/HoundOfBaskerville.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/HoundOfBaskerville.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/HoundOfBaskerville.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateful;
+import javax.webbeans.Specializes;
+
+@Specializes
+@Stateful
+class HoundOfBaskerville extends Hound
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/HoundOfBaskerville.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Husky_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Husky_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Husky_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.ConversationScoped;
+
+
+//@Singleton
+@ConversationScoped
+class Husky_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Husky_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/IrishTerrier_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/IrishTerrier_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/IrishTerrier_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.SessionScoped;
+
+//@Singleton
+@SessionScoped
+class IrishTerrier_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/IrishTerrier_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/JackRussellTerrier.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/JackRussellTerrier.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/JackRussellTerrier.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Destructor;
+import javax.webbeans.Observes;
+import javax.webbeans.RequestScoped;
+
+@Stateful
+@RequestScoped
+class JackRussellTerrier
+{
+ @Remove @Destructor
+ public void bye(@Observes Object something) {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/JackRussellTerrier.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Koirus.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Koirus.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Koirus.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Dependent;
+
+@Stateful
+@Dependent
+class Koirus
+{
+
+ public static boolean removeCalled = false;
+
+ @Remove
+ public void bye(Object param)
+ {
+ removeCalled = true;
+ }
+}
\ No newline at end of file
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Koirus.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Labrador.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Labrador.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Labrador.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,10 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.Dependent;
+
+//@Singleton
+@Dependent
+class Labrador
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Labrador.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Laika.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Laika.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Laika.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.webbeans.ApplicationScoped;
+
+//@Singleton
+@ApplicationScoped
+class Laika
+{
+
+ @Remove
+ public void remove()
+ {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Laika.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Leopard.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Leopard.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Leopard.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.webbeans.Production;
+
+@Production
+//@MessageDriven
+class Leopard /*implements javax.jms.MessageListener*/
+{
+
+ public void onMessage(/*Message message*/)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Leopard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/LocalGoodDoggie.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/LocalGoodDoggie.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/LocalGoodDoggie.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Local;
+import javax.ejb.Remove;
+
+@Local
+public interface LocalGoodDoggie
+{
+ @Remove
+ public void bye();
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/LocalGoodDoggie.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pekingese_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pekingese_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pekingese_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.Decorator;
+
+@Stateless
+@Decorator
+class Pekingese_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pekingese_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pitbull.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pitbull.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pitbull.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.ApplicationScoped;
+import javax.webbeans.Destructor;
+import javax.webbeans.Named;
+
+@Stateful
+@ApplicationScoped
+@Named
+class Pitbull
+{
+
+ public static boolean destructorCalled = false;
+
+ @Remove @Destructor
+ public void bye()
+ {
+ destructorCalled = true;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pitbull.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pug_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pug_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pug_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateless;
+import javax.webbeans.Interceptor;
+
+@Stateless
+@Interceptor
+class Pug_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pug_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pumi_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pumi_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pumi_Broken.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateful;
+import javax.webbeans.RequestScoped;
+
+@Stateful
+@RequestScoped
+class Pumi_Broken
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Pumi_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Rottweiler.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Rottweiler.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Rottweiler.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateful;
+import javax.webbeans.Destructor;
+import javax.webbeans.RequestScoped;
+
+@Stateful
+@RequestScoped
+class Rottweiler
+{
+ @Destructor
+ public void bye() {
+
+ }
+
+ @Destructor
+ public void bye2() {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Rottweiler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/RussellTerrier.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/RussellTerrier.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/RussellTerrier.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateful;
+import javax.webbeans.Destructor;
+import javax.webbeans.RequestScoped;
+
+@Stateful
+@RequestScoped
+class RussellTerrier
+{
+ @Destructor
+ public void bye() {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/RussellTerrier.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Saluki.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Saluki.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Saluki.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Initializer;
+import javax.webbeans.RequestScoped;
+
+@Stateful
+@RequestScoped
+class Saluki
+{
+ @Remove @Initializer
+ public void bye() {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Saluki.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Spitz.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Spitz.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Spitz.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Produces;
+import javax.webbeans.RequestScoped;
+
+@Stateful
+@RequestScoped
+class Spitz
+{
+ @Remove @Produces
+ public void bye() {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Spitz.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Tame.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Tame.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Tame.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+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.webbeans.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Tame
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Tame.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Toller.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Toller.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Toller.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.RequestScoped;
+
+@Stateful
+@RequestScoped
+class Toller
+{
+
+ public static boolean removeCalled = false;
+
+ @Remove
+ public void bye()
+ {
+ removeCalled = true;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/Toller.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WelshCorgie.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WelshCorgie.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WelshCorgie.java 2009-01-17 19:01:47 UTC (rev 1043)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.tests.implementation.enterprise;
+
+import javax.ejb.Stateful;
+import javax.webbeans.Dependent;
+
+@Stateful
+@Dependent
+class WelshCorgie
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/implementation/enterprise/WelshCorgie.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 2 months