Author: jharting
Date: 2009-07-21 04:38:30 -0400 (Tue, 21 Jul 2009)
New Revision: 3105
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/array/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/FinalClassTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/FishFarm.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FinalMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FishFarm.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/NumberProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/Number_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/UnproxyableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/array/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/finalmethod/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/privateconstructor/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/FinalTuna_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/FishFarm.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/UnproxyableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean_Broken.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/array/ArrayProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/array/ArrayTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/array/InjectionPointBean_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/PrivateConstructorTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/Unproxyable_Broken.java
Log:
Client proxy tests
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java 2009-07-21
08:04:41 UTC (rev 3104)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -1,3 +1,19 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.jboss.jsr299.tck.tests.lookup.clientProxy;
import java.io.IOException;
@@ -2,2 +18,3 @@
+import javax.enterprise.context.ContextNotActiveException;
import javax.enterprise.inject.spi.Bean;
@@ -44,7 +61,7 @@
@Test
@SpecAssertion(section = "unknown", id = "unknown")
- public void testSimpleWebBeanClientProxyIsSerializable() throws IOException,
ClassNotFoundException
+ public void testSimpleBeanClientProxyIsSerializable() throws IOException,
ClassNotFoundException
{
TunedTuna tuna = getInstanceByType(TunedTuna.class);
assert getCurrentConfiguration().getBeans().isProxy(tuna);
@@ -62,5 +79,31 @@
TunedTuna tuna = (TunedTuna) getCurrentManager().getReference(tunaBean,
TunedTuna.class, getCurrentManager().createCreationalContext(tunaBean));
assert getCurrentConfiguration().getBeans().isProxy(tuna);
assert tuna.getState().equals("tuned");
+ // TODO expand this test
}
+ @Test
+ @SpecAssertion(section="5.5.2", id="ab")
+ public void testInactiveScope() throws Exception {
+ new RunInDependentContext()
+ {
+ @Override
+ protected void execute() throws Exception
+ {
+ assert
getCurrentConfiguration().getContexts().getRequestContext().isActive();
+
setContextInactive(getCurrentConfiguration().getContexts().getRequestContext());
+ assert
!getCurrentConfiguration().getContexts().getRequestContext().isActive();
+ try {
+ getInstanceByType(TunedTuna.class).getState();
+ assert false;
+ } catch (ContextNotActiveException cnae) {
+ } catch (IllegalStateException ise) {
+ } catch (Throwable t) {
+ assert false;
+ }
+
+ // TODO need to set request scope active again, some other tests will fail
otherwise
+
setContextActive(getCurrentConfiguration().getContexts().getRequestContext());
+ }
+ }.run();
+ }
}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/FinalTuna_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/FinalTuna_Broken.java 2009-07-21
08:04:41 UTC (rev 3104)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/FinalTuna_Broken.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable;
-
-import javax.enterprise.context.RequestScoped;
-
-@RequestScoped
-final class FinalTuna_Broken
-{
-
-}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/FishFarm.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/FishFarm.java 2009-07-21
08:04:41 UTC (rev 3104)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/FishFarm.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -1,10 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable;
-
-import javax.enterprise.inject.Current;
-
-public class FishFarm
-{
-
- @Current FinalTuna_Broken tuna;
-
-}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/UnproxyableTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/UnproxyableTest.java 2009-07-21
08:04:41 UTC (rev 3104)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/UnproxyableTest.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -1,24 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.clientProxy.unproxyable;
-
-import org.hibernate.tck.annotations.SpecAssertion;
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.testng.annotations.Test;
-
-/**
- *
- * Spec version: 20090625
- *
- */
-@Artifact
-public class UnproxyableTest extends AbstractJSR299Test
-{
- @Test(groups = "rewrite")
- // Needs to detect problem
- @SpecAssertion(section = "5.5.1", id = "baa")
- public void testInjectionPointWithUnproxyableTypeWhichResolvesToNormalScopedWebBean()
- {
- assert false;
- }
-
-}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/array
(from rev 3043,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/array)
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/array/ArrayProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/array/ArrayProducer.java 2009-07-09
23:42:02 UTC (rev 3043)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/array/ArrayProducer.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -1,4 +1,20 @@
-package org.jboss.jsr299.tck.tests.lookup.clientProxy.array;
+/*
+ * 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.jsr299.tck.tests.lookup.clientProxy.unproxyable.array;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Produces;
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/array/ArrayTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/array/ArrayTest.java 2009-07-09
23:42:02 UTC (rev 3043)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/array/ArrayTest.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -1,21 +1,39 @@
-package org.jboss.jsr299.tck.tests.lookup.clientProxy.array;
+/*
+ * 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.jsr299.tck.tests.lookup.clientProxy.unproxyable.array;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
/**
* Test for problem detection of array injection.
*
- * Spec version: 20090519
+ * Spec version: 2009625
*/
@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
public class ArrayTest extends AbstractJSR299Test
{
- @Test(groups = "rewrite")
- // Needs to detect problem
- @SpecAssertion(section = "5.3.1", id = "da")
+ @Test
+ @SpecAssertion(section = "5.5.1", id = "da")
public void testInjectionPointWithArrayType()
{
assert false;
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/array/InjectionPointBean_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/array/InjectionPointBean_Broken.java 2009-07-09
23:42:02 UTC (rev 3043)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/array/InjectionPointBean_Broken.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -1,4 +1,20 @@
-package org.jboss.jsr299.tck.tests.lookup.clientProxy.array;
+/*
+ * 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.jsr299.tck.tests.lookup.clientProxy.unproxyable.array;
import javax.enterprise.inject.Current;
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/FinalClassTest.java
(from rev 3043,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/UnproxyableTest.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/FinalClassTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/FinalClassTest.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -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.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalClass;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * Spec version: 20090625
+ *
+ */
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+public class FinalClassTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "5.5.1", id = "baa")
+ public void testInjectionPointWithUnproxyableTypeWhichResolvesToNormalScopedBean()
+ {
+ assert false;
+ }
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/FishFarm.java
(from rev 3043,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/FishFarm.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/FishFarm.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/FishFarm.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -0,0 +1,26 @@
+/*
+ * 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.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalClass;
+
+import javax.enterprise.inject.Current;
+
+class FishFarm
+{
+
+ @Current Tuna_Broken tuna;
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna_Broken.java
(from rev 3043,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/FinalTuna_Broken.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna_Broken.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -0,0 +1,25 @@
+/*
+ * 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.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalClass;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+final class Tuna_Broken
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FinalMethodTest.java
(from rev 3043,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/finalmethod/FinalMethodTest.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FinalMethodTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FinalMethodTest.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -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.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalMethod;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * Spec version: 20090625
+ *
+ */
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+public class FinalMethodTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "5.5.1", id = "bba")
+ public void testClassWithFinalMethodCannotBeProxied()
+ {
+ assert false;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FishFarm.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FishFarm.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FishFarm.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -0,0 +1,24 @@
+/*
+ * 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.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalMethod;
+
+import javax.enterprise.inject.Current;
+
+class FishFarm
+{
+ @Current Tuna_Broken tuna;
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna_Broken.java
(from rev 3043,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/finalmethod/Tuna_Broken.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna_Broken.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -0,0 +1,25 @@
+/*
+ * 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.jsr299.tck.tests.lookup.clientProxy.unproxyable.finalMethod;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+class Tuna_Broken
+{
+ public final String getFoo() { return null; }
+}
\ No newline at end of file
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/NumberProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/NumberProducer.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/NumberProducer.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -0,0 +1,30 @@
+/*
+ * 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.jsr299.tck.tests.lookup.clientProxy.unproxyable.primitive;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Produces;
+
+class NumberProducer
+{
+
+ @Produces
+ @RequestScoped
+ public int produce() {
+ return 0;
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/Number_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/Number_Broken.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/Number_Broken.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -0,0 +1,27 @@
+/*
+ * 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.jsr299.tck.tests.lookup.clientProxy.unproxyable.primitive;
+
+import javax.enterprise.inject.Current;
+
+class Number_Broken
+{
+
+ @SuppressWarnings("unused")
+ @Current private int number;
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/UnproxyableTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/UnproxyableTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/primitive/UnproxyableTest.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -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.jsr299.tck.tests.lookup.clientProxy.unproxyable.primitive;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * Spec version: 20090625
+ *
+ */
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+public class UnproxyableTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertion(section = "5.5.1", id = "ca")
+ public void testInjectionPointWithUnproxyableTypeWhichResolvesToNormalScopedBean()
+ {
+ assert false;
+ }
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor
(from rev 3043,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/privateconstructor)
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/AnotherDeploymentType.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/privateconstructor/AnotherDeploymentType.java 2009-07-09
23:42:02 UTC (rev 3043)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/AnotherDeploymentType.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -1,20 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.clientProxy.privateconstructor;
-
-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.enterprise.inject.deployment.DeploymentType;
-
-@Target( { TYPE, METHOD })
-@Retention(RUNTIME)
-@Documented
-@DeploymentType
-@interface AnotherDeploymentType
-{
-
-}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean.java
(from rev 3043,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/privateconstructor/InjectionPointBean_Broken.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -0,0 +1,24 @@
+/*
+ * 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.jsr299.tck.tests.lookup.clientProxy.unproxyable.privateConstructor;
+
+import javax.enterprise.inject.Current;
+
+class InjectionPointBean
+{
+ @Current Unproxyable_Broken foo;
+}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/privateconstructor/InjectionPointBean_Broken.java 2009-07-09
23:42:02 UTC (rev 3043)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/InjectionPointBean_Broken.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.clientProxy.privateconstructor;
-
-import javax.enterprise.inject.Any;
-import javax.enterprise.inject.Instance;
-
-class InjectionPointBean_Broken
-{
- @Any Instance<Unproxyable_Broken> foo;
-}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/PrivateConstructorTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/privateconstructor/PrivateConstructorTest.java 2009-07-09
23:42:02 UTC (rev 3043)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/PrivateConstructorTest.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -1,22 +1,40 @@
-package org.jboss.jsr299.tck.tests.lookup.clientProxy.privateconstructor;
+/*
+ * 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.jsr299.tck.tests.lookup.clientProxy.unproxyable.privateConstructor;
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
/**
* Test for problem detection of unproxyable bean with private constructor.
*
- * Spec version: 20090519
+ * Spec version: 20090625
*/
@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
public class PrivateConstructorTest extends AbstractJSR299Test
{
- @Test(groups = "rewrite")
- // Needs to detect the problem
- @SpecAssertion(section = "5.3.1", id = "aa")
+ @Test
+ @SpecAssertion(section = "5.5.1", id = "aa")
public void testClassWithPrivateConstructor()
{
assert false;
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/Unproxyable_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/privateconstructor/Unproxyable_Broken.java 2009-07-09
23:42:02 UTC (rev 3043)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/privateConstructor/Unproxyable_Broken.java 2009-07-21
08:38:30 UTC (rev 3105)
@@ -1,13 +1,26 @@
-package org.jboss.jsr299.tck.tests.lookup.clientProxy.privateconstructor;
+/*
+ * 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.jsr299.tck.tests.lookup.clientProxy.unproxyable.privateConstructor;
import javax.enterprise.context.RequestScoped;
-@AnotherDeploymentType
@RequestScoped
class Unproxyable_Broken
{
- private Unproxyable_Broken()
- {
-
- }
+ private Unproxyable_Broken() {}
+
}