Author: dsvyatobatsko
Date: 2008-06-25 10:43:07 -0400 (Wed, 25 Jun 2008)
New Revision: 9223
Added:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TestAnnotationTransformer.java
Log:
test annotation transformer added
Added:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TestAnnotationTransformer.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TestAnnotationTransformer.java
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TestAnnotationTransformer.java 2008-06-25
14:43:07 UTC (rev 9223)
@@ -0,0 +1,28 @@
+package org.richfaces;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+import org.testng.internal.annotations.IAnnotationTransformer;
+import org.testng.internal.annotations.ITest;
+import org.testng.internal.annotations.TestAnnotation;
+
+/**
+ * This transformer sets necessary data provider for each test method.
+ *
+ * @author carcasser
+ */
+public class TestAnnotationTransformer implements IAnnotationTransformer {
+
+ /**
+ * @see IAnnotationTransformer#transform(ITest, Class, Constructor, Method)
+ */
+ public void transform(ITest annotation, Class testClass, Constructor testConstructor,
Method testMethod) {
+
+ if ((testClass == null || RichSeleniumTest.class.isAssignableFrom(testClass))
+ && (annotation instanceof TestAnnotation)) {
+ ((TestAnnotation) annotation).setDataProvider("templates");
+ }
+ }
+
+}
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TestAnnotationTransformer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Show replies by date