Author: pete.muir(a)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;
+
+@Target( { TYPE, METHOD, PARAMETER })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@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
Show replies by date