[weld-commits] Weld SVN: r6109 - in core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy: weld477 and 1 other directory.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Tue Apr 13 13:35:12 EDT 2010


Author: marius.bogoevici
Date: 2010-04-13 13:35:12 -0400 (Tue, 13 Apr 2010)
New Revision: 6109

Added:
   core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/
   core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/InjectedClass.java
   core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/ProxiabilityTest.java
   core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/ScopedClass.java
Log:
Add test for WELD-477

Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/InjectedClass.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/InjectedClass.java	                        (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/InjectedClass.java	2010-04-13 17:35:12 UTC (rev 6109)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.tests.proxy.weld477;
+
+import javax.inject.Inject;
+
+/**
+ * @author Marius Bogoevici
+ */
+public class InjectedClass
+{
+   @Inject ScopedClass dependency;
+
+   public ScopedClass getDependency()
+   {
+      return dependency;
+   }
+}

Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/ProxiabilityTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/ProxiabilityTest.java	                        (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/ProxiabilityTest.java	2010-04-13 17:35:12 UTC (rev 6109)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.tests.proxy.weld477;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @author Marius Bogoevici
+ */
+ at Artifact
+public class ProxiabilityTest extends AbstractWeldTest
+{
+
+   @Test(description = "https://jira.jboss.org/jira/browse/WELD-477", groups="broken")
+   public void testClassWithPrivateFinalMethodsProxyable()
+   {
+       InjectedClass injectedClassInstance = getReference(InjectedClass.class);
+       Assert.assertNotNull(injectedClassInstance.getDependency());
+   }
+}

Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/ScopedClass.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/ScopedClass.java	                        (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/proxy/weld477/ScopedClass.java	2010-04-13 17:35:12 UTC (rev 6109)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.tests.proxy.weld477;
+
+import javax.enterprise.context.ApplicationScoped;
+
+/**
+ * @author Marius Bogoevici
+ */
+ at ApplicationScoped
+public class ScopedClass
+{
+   private final void privateMethod()
+   {
+
+   }
+                                           
+   public void publicMethod()
+   {
+
+   }
+   
+}



More information about the weld-commits mailing list