[jboss-cvs] JBossAS SVN: r97153 - projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Nov 30 02:49:51 EST 2009
Author: jeff.zhang
Date: 2009-11-30 02:49:50 -0500 (Mon, 30 Nov 2009)
New Revision: 97153
Modified:
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java
Log:
[JBJCA-225] Fix AnnotationsTestCase - test compile error
Modified: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java 2009-11-30 06:56:19 UTC (rev 97152)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/annotations/AnnotationsTestCase.java 2009-11-30 07:49:50 UTC (rev 97153)
@@ -36,7 +36,9 @@
import org.jboss.papaki.AnnotationScanner;
import org.jboss.papaki.AnnotationScannerFactory;
+import org.junit.After;
import org.junit.AfterClass;
+import org.junit.Before;
import org.junit.BeforeClass;
//import org.junit.Ignore;
import org.junit.Test;
@@ -62,6 +64,11 @@
* Embedded
*/
private static EmbeddedJCA embedded;
+
+ /*
+ * Annotations
+ */
+ private Annotations annotations;
// --------------------------------------------------------------------------------||
// Tests --------------------------------------------------------------------------||
@@ -74,7 +81,7 @@
@Test(expected = DeployException.class)
public void testProcessNullArguments() throws Throwable
{
- Annotations.process(null, null);
+ annotations.process(null, null);
}
/**
@@ -85,7 +92,7 @@
public void testProcessNullAnnotationRepository() throws Throwable
{
ConnectorMetaData cmd = new ConnectorMetaData();
- Annotations.process(cmd, null);
+ annotations.process(cmd, null);
}
/**
@@ -101,7 +108,7 @@
AnnotationScanner asf = AnnotationScannerFactory.getDefault();
AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
- Annotations.process(null, ar);
+ annotations.process(null, ar);
}
catch (Throwable t)
{
@@ -123,7 +130,7 @@
AnnotationScanner asf = AnnotationScannerFactory.getDefault();
AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
- Annotations.process(null, ar);
+ annotations.process(null, ar);
}
catch (Throwable t)
{
@@ -144,7 +151,7 @@
AnnotationScanner asf = AnnotationScannerFactory.getDefault();
AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
- Annotations.process(null, ar);
+ annotations.process(null, ar);
fail("Success");
}
@@ -167,7 +174,7 @@
AnnotationScanner asf = AnnotationScannerFactory.getDefault();
AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
- Annotations.process(null, ar);
+ annotations.process(null, ar);
}
catch (Throwable t)
{
@@ -189,7 +196,7 @@
AnnotationScanner asf = AnnotationScannerFactory.getDefault();
AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
- Annotations.process(null, ar);
+ annotations.process(null, ar);
}
catch (Throwable t)
{
@@ -210,7 +217,7 @@
AnnotationScanner asf = AnnotationScannerFactory.getDefault();
AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
- Annotations.process(null, ar);
+ annotations.process(null, ar);
}
catch (Throwable t)
{
@@ -231,7 +238,7 @@
AnnotationScanner asf = AnnotationScannerFactory.getDefault();
AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
- Annotations.process(null, ar);
+ annotations.process(null, ar);
}
catch (Throwable t)
{
@@ -252,7 +259,7 @@
AnnotationScanner asf = AnnotationScannerFactory.getDefault();
AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
- Annotations.process(null, ar);
+ annotations.process(null, ar);
}
catch (Throwable t)
{
@@ -273,7 +280,7 @@
AnnotationScanner asf = AnnotationScannerFactory.getDefault();
AnnotationRepository ar = asf.scan(new URL[] {url}, Thread.currentThread().getContextClassLoader());
- Annotations.process(null, ar);
+ annotations.process(null, ar);
}
catch (Throwable t)
{
@@ -284,8 +291,28 @@
// --------------------------------------------------------------------------------||
// Lifecycle Methods --------------------------------------------------------------||
// --------------------------------------------------------------------------------||
+
+ /**
+ * be run before the Test method.
+ * @throws Throwable throwable exception
+ */
+ @Before
+ public void setup() throws Throwable
+ {
+ annotations = new Annotations();
+ }
/**
+ * causes that method to be run after the Test method.
+ * @throws Throwable throwable exception
+ */
+ @After
+ public void tearDown() throws Throwable
+ {
+ annotations = null;
+ }
+
+ /**
* Lifecycle start, before the suite is executed
* @throws Throwable throwable exception
*/
More information about the jboss-cvs-commits
mailing list