Author: pete.muir(a)jboss.org
Date: 2009-10-29 09:09:56 -0400 (Thu, 29 Oct 2009)
New Revision: 4400
Added:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Choice.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/ClassAnnotatedItemTest.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Kangaroo.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/TimeBound.java
Removed:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Choice.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Kangaroo.java
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/BallImpl.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTest.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Defender.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTest.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Referee.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Defender.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Goalkeeper.java
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/PassivationActivationTest.java
Log:
fix tests so they run incontainer
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Choice.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Choice.java 2009-10-29
13:08:26 UTC (rev 4399)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Choice.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -1,14 +0,0 @@
-package org.jboss.weld.test.unit.implementation.annotatedItem;
-
-abstract class ChoiceParent<T>
-{
-}
-
-
-class Choice<T, E> extends ChoiceParent<T>
-{
- public Choice<T, E> aMethod()
- {
- return null;
- }
-}
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java 2009-10-29
13:08:26 UTC (rev 4399)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -5,11 +5,9 @@
import java.util.Set;
import javax.enterprise.inject.Stereotype;
-import javax.enterprise.inject.spi.AnnotatedType;
import javax.inject.Qualifier;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.Classes;
import org.jboss.weld.introspector.WeldClass;
import org.jboss.weld.introspector.jlr.WeldClassImpl;
import org.jboss.weld.metadata.TypeStore;
@@ -17,8 +15,7 @@
import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
-@Artifact(addCurrentPackage = false)
-(a)Classes({Animal.class, Antelope.class, Kangaroo.class, Order.class, Random.class})
+@Artifact
public class ClassAnnotatedItemTest extends AbstractWeldTest
{
@@ -53,12 +50,5 @@
WeldClass<Antelope> classWithNoAnnotations = WeldClassImpl.of(Antelope.class,
transformer);
assert classWithNoAnnotations.getAnnotations().size() == 0;
}
-
- @Test(groups = "broken")
- public void testNonStaticInnerClassWithGenericTypes()
- {
- AnnotatedType at = WeldClassImpl.of(new Kangaroo().procreate().getClass(),
transformer);
- WeldClassImpl.of(at, transformer);
- }
}
Deleted:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Kangaroo.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Kangaroo.java 2009-10-29
13:08:26 UTC (rev 4399)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Kangaroo.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -1,17 +0,0 @@
-package org.jboss.weld.test.unit.implementation.annotatedItem;
-
-
-class Kangaroo
-{
- LittleKangarooInHerPouch<String> procreate()
- {
- return new LittleKangarooInHerPouch<String>("Joey");
- }
-
- class LittleKangarooInHerPouch<T>
- {
- LittleKangarooInHerPouch(T formalParam)
- {
- }
- }
-}
Copied:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Choice.java
(from rev 4397,
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/Choice.java)
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Choice.java
(rev 0)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Choice.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -0,0 +1,14 @@
+package org.jboss.weld.test.unit.implementation.annotatedItem.anonymous;
+
+abstract class ChoiceParent<T>
+{
+}
+
+
+class Choice<T, E> extends ChoiceParent<T>
+{
+ public Choice<T, E> aMethod()
+ {
+ return null;
+ }
+}
Added:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/ClassAnnotatedItemTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/ClassAnnotatedItemTest.java
(rev 0)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/ClassAnnotatedItemTest.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -0,0 +1,25 @@
+package org.jboss.weld.test.unit.implementation.annotatedItem.anonymous;
+
+import javax.enterprise.inject.spi.AnnotatedType;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.weld.introspector.jlr.WeldClassImpl;
+import org.jboss.weld.metadata.TypeStore;
+import org.jboss.weld.resources.ClassTransformer;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class ClassAnnotatedItemTest extends AbstractWeldTest
+{
+
+ private final ClassTransformer transformer = new ClassTransformer(new TypeStore());
+
+ @Test(groups = "broken")
+ public void testNonStaticInnerClassWithGenericTypes()
+ {
+ AnnotatedType at = WeldClassImpl.of(new Kangaroo().procreate().getClass(),
transformer);
+ WeldClassImpl.of(at, transformer);
+ }
+
+}
Property changes on:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/ClassAnnotatedItemTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Kangaroo.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Kangaroo.java
(rev 0)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Kangaroo.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -0,0 +1,17 @@
+package org.jboss.weld.test.unit.implementation.annotatedItem.anonymous;
+
+
+class Kangaroo
+{
+ LittleKangarooInHerPouch<String> procreate()
+ {
+ return new LittleKangarooInHerPouch<String>("Joey");
+ }
+
+ class LittleKangarooInHerPouch<T>
+ {
+ LittleKangarooInHerPouch(T formalParam)
+ {
+ }
+ }
+}
Property changes on:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/anonymous/Kangaroo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/BallImpl.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/BallImpl.java 2009-10-29
13:08:26 UTC (rev 4399)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/BallImpl.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -19,6 +19,7 @@
import javax.ejb.Stateless;
import javax.ejb.Timeout;
+import javax.ejb.Timer;
/**
* @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
@@ -37,7 +38,7 @@
}
@Timeout
- public void finishGame()
+ public void finishGame(Timer timer)
{
}
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTest.java 2009-10-29
13:08:26 UTC (rev 4399)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTest.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -1,10 +1,11 @@
package org.jboss.weld.test.unit.interceptor.ejb;
+import java.lang.reflect.Method;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
-import java.util.Arrays;
-
+import javax.ejb.Timer;
import javax.enterprise.inject.spi.InterceptionType;
import org.jboss.testharness.impl.packaging.Artifact;
@@ -13,9 +14,8 @@
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.jboss.weld.bean.SessionBean;
import org.jboss.weld.bean.interceptor.InterceptorBindingsAdapter;
+import org.jboss.weld.ejb.spi.InterceptorBindings;
import org.jboss.weld.test.AbstractWeldTest;
-import org.jboss.weld.ejb.spi.InterceptorBindings;
-
import org.testng.annotations.Test;
@Artifact
@@ -47,9 +47,10 @@
assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_INVOKE,
ballSessionBean.getType().getMethod("pass")).size() == 1;
assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_INVOKE,
ballSessionBean.getType().getMethod("pass")).get(0).getBeanClass().equals(Defender.class);
- assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_INVOKE,
ballSessionBean.getType().getMethod("finishGame")).size() == 0;
- assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_TIMEOUT,
ballSessionBean.getType().getMethod("finishGame")).size() == 1;
- assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_TIMEOUT,
ballSessionBean.getType().getMethod("finishGame")).get(0).getBeanClass().equals(Referee.class);
+ Method finishGameMethod =
ballSessionBean.getType().getMethod("finishGame", Timer.class);
+ assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_INVOKE,
finishGameMethod).size() == 0;
+ assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_TIMEOUT,
finishGameMethod).size() == 1;
+ assert interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_TIMEOUT,
finishGameMethod).get(0).getBeanClass().equals(Referee.class);
}
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Defender.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Defender.java 2009-10-29
13:08:26 UTC (rev 4399)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Defender.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -17,12 +17,9 @@
package org.jboss.weld.test.unit.interceptor.ejb3model;
-import javax.interceptor.Interceptor;
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
-import org.jboss.weld.test.unit.interceptor.ejb.Pass;
-
/**
* @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
*/
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTest.java 2009-10-29
13:08:26 UTC (rev 4399)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTest.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -17,15 +17,13 @@
package org.jboss.weld.test.unit.interceptor.ejb3model;
-import javax.enterprise.inject.spi.Bean;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Bean;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.weld.test.AbstractWeldTest;
-
-import org.testng.annotations.Test;
-import org.testng.annotations.BeforeTest;
import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
/**
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Referee.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Referee.java 2009-10-29
13:08:26 UTC (rev 4399)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Referee.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -16,10 +16,8 @@
*/
package org.jboss.weld.test.unit.interceptor.ejb3model;
-import org.jboss.weld.test.unit.interceptor.ejb.TimeBound;
-
-import javax.interceptor.Interceptor;
import javax.interceptor.AroundTimeout;
+import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
/**
Added:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/TimeBound.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/TimeBound.java
(rev 0)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/TimeBound.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, 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.weld.test.unit.interceptor.ejb3model;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Documented;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import javax.interceptor.InterceptorBinding;
+
+/**
+ * @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
+ */
+@InterceptorBinding
+@Retention(RUNTIME)
+(a)Target({ElementType.METHOD, ElementType.TYPE})
+@Documented
+public @interface TimeBound
+{
+}
\ No newline at end of file
Property changes on:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/TimeBound.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Defender.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Defender.java 2009-10-29
13:08:26 UTC (rev 4399)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Defender.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -19,13 +19,10 @@
import java.io.Serializable;
-import javax.interceptor.Interceptor;
import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
-import org.jboss.weld.test.unit.interceptor.ejb.*;
-import org.jboss.weld.test.unit.interceptor.ejb.Pass;
-
/**
* @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
*/
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Goalkeeper.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Goalkeeper.java 2009-10-29
13:08:26 UTC (rev 4399)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/Goalkeeper.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -19,13 +19,10 @@
import java.io.Serializable;
-import javax.interceptor.Interceptor;
import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
-import org.jboss.weld.test.unit.interceptor.ejb.*;
-import org.jboss.weld.test.unit.interceptor.ejb.Shot;
-
/**
* @author <a href="mailto:mariusb@redhat.com">Marius
Bogoevici</a>
*/
Modified:
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/PassivationActivationTest.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/PassivationActivationTest.java 2009-10-29
13:08:26 UTC (rev 4399)
+++
core/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/passivation/PassivationActivationTest.java 2009-10-29
13:09:56 UTC (rev 4400)
@@ -17,18 +17,17 @@
package org.jboss.weld.test.unit.interceptor.passivation;
+import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
-import java.io.ObjectOutputStream;
import java.io.ObjectInputStream;
-import java.io.ByteArrayInputStream;
+import java.io.ObjectOutputStream;
-import javax.enterprise.inject.spi.Bean;
import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.Bean;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.jboss.weld.test.AbstractWeldTest;
-
import org.testng.annotations.Test;
/**
@@ -39,7 +38,7 @@
public class PassivationActivationTest extends AbstractWeldTest
{
- @Test
+ @Test(groups = "incontainer-broken")
public void testPassivationAndActivation() throws Exception
{
Bean bean = getCurrentManager().getBeans(Ball.class).iterator().next();