[weld-commits] Weld SVN: r5201 - core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/annotation.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Thu Dec 3 07:39:54 EST 2009


Author: pete.muir at jboss.org
Date: 2009-12-03 07:39:54 -0500 (Thu, 03 Dec 2009)
New Revision: 5201

Added:
   core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/annotation/Quality.java
Modified:
   core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/annotation/AnnotationTest.java
Log:
WELDX-56

Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/annotation/AnnotationTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/annotation/AnnotationTest.java	2009-12-03 07:18:13 UTC (rev 5200)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/annotation/AnnotationTest.java	2009-12-03 12:39:54 UTC (rev 5201)
@@ -5,6 +5,7 @@
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
+import java.lang.reflect.Method;
 
 import org.testng.annotations.Test;
 
@@ -18,6 +19,14 @@
       Synchronous synchronous = AnnotationTest.class.getAnnotation(Synchronous.class);
       deserialize(serialize(synchronous));
    }
+   
+   @Test
+   public void testGetAnnotationDefaults() throws Throwable
+   {
+      Method method = Quality.class.getMethod("value");
+      Object value = method.getDefaultValue();
+      assert value.equals("very");
+   }
 
    protected byte[] serialize(Object instance) throws IOException
    {

Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/annotation/Quality.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/annotation/Quality.java	                        (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/annotation/Quality.java	2009-12-03 12:39:54 UTC (rev 5201)
@@ -0,0 +1,23 @@
+package org.jboss.weld.tests.unit.reflection.annotation;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+ at Target( { TYPE, METHOD, PARAMETER })
+ at Retention(RUNTIME)
+ at Documented
+ at Qualifier
+ at interface Quality
+{
+   
+   String value() default "very";
+
+}


Property changes on: core/trunk/tests/src/test/java/org/jboss/weld/tests/unit/reflection/annotation/Quality.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native



More information about the weld-commits mailing list