tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgallim...@apache.org
Subject svn commit: r1178985 - in /openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests: ./ resenventry/
Date Tue, 04 Oct 2011 22:26:38 GMT
Author: jgallimore
Date: Tue Oct  4 22:26:38 2011
New Revision: 1178985

URL: http://svn.apache.org/viewvc?rev=1178985&view=rev
Log:
OPENEJB-1687 fixed ServletResourceEnvEntryInjectionTest for remote adapter. Stats now Embedded:
Tests run: 82, Failures: 6, Errors: 2, Skipped: 0  Remote: Tests run: 82, Failures: 6, Errors:
5, Skipped: 0

Modified:
    openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/TestSetup.java
    openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Blue.java
    openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Orange.java
    openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Purple.java
    openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/ServletResourceEnvEntryInjectionTest.java

Modified: openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/TestSetup.java
URL: http://svn.apache.org/viewvc/openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/TestSetup.java?rev=1178985&r1=1178984&r2=1178985&view=diff
==============================================================================
--- openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/TestSetup.java
(original)
+++ openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/TestSetup.java
Tue Oct  4 22:26:38 2011
@@ -41,15 +41,6 @@ import static junit.framework.Assert.ass
 
 public abstract class TestSetup {
 
-    public static void assertFields(Object obj) throws IllegalAccessException {
-        final Field[] fields = obj.getClass().getDeclaredFields();
-
-        for (Field field : fields) {
-            field.setAccessible(true);
-            Assert.assertNotNull(field.getName(), field.get(obj));
-        }
-    }
-
     public WebArchive createDeployment(Class...archiveClasses) {
         WebAppDescriptor descriptor = Descriptors.create(WebAppDescriptor.class)
                 .version("3.0");

Modified: openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Blue.java
URL: http://svn.apache.org/viewvc/openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Blue.java?rev=1178985&r1=1178984&r2=1178985&view=diff
==============================================================================
--- openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Blue.java
(original)
+++ openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Blue.java
Tue Oct  4 22:26:38 2011
@@ -60,9 +60,8 @@ public class Blue extends HttpServlet {
             Assert.assertNotNull(field.getName(), field.get(this));
         }
 
-        final String name = ServletResourceEnvEntryInjectionTest.class.getSimpleName();
-        Assert.assertEquals("app", name, app);
-        Assert.assertEquals("module", name, module);
+        Assert.assertEquals("app", "ServletResourceEnvEntryInjectionTest", app);
+        Assert.assertEquals("module", "ServletResourceEnvEntryInjectionTest", module);
     }
 
 }
\ No newline at end of file

Modified: openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Orange.java
URL: http://svn.apache.org/viewvc/openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Orange.java?rev=1178985&r1=1178984&r2=1178985&view=diff
==============================================================================
--- openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Orange.java
(original)
+++ openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Orange.java
Tue Oct  4 22:26:38 2011
@@ -1,6 +1,7 @@
 package org.apache.openejb.arquillian.tests.resenventry;
 
 import java.io.IOException;
+import java.lang.reflect.Field;
 
 import javax.annotation.Resource;
 import javax.enterprise.inject.spi.BeanManager;
@@ -45,7 +46,12 @@ public class Orange extends HttpServlet 
 
     public void test() throws Exception {
 
-        ServletResourceEnvEntryInjectionTest.assertFields(this);
+        final Field[] fields = this.getClass().getDeclaredFields();
+		
+		for (Field field : fields) {
+		    field.setAccessible(true);
+		    Assert.assertNotNull(field.getName(), field.get(this));
+		}
 
         Assert.assertEquals("app", "BuiltInEnvironmentEntriesTest", app);
     }

Modified: openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Purple.java
URL: http://svn.apache.org/viewvc/openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Purple.java?rev=1178985&r1=1178984&r2=1178985&view=diff
==============================================================================
--- openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Purple.java
(original)
+++ openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/Purple.java
Tue Oct  4 22:26:38 2011
@@ -1,5 +1,7 @@
 package org.apache.openejb.arquillian.tests.resenventry;
 
+import java.lang.reflect.Field;
+
 import javax.annotation.ManagedBean;
 import javax.annotation.Resource;
 import javax.enterprise.inject.spi.BeanManager;
@@ -9,6 +11,8 @@ import javax.transaction.UserTransaction
 import javax.validation.Validator;
 import javax.validation.ValidatorFactory;
 
+import org.junit.Assert;
+
 @ManagedBean
 public class Purple {
 
@@ -31,6 +35,11 @@ public class Purple {
     private BeanManager beanManager;
 
     public void test() throws IllegalAccessException {
-        ServletResourceEnvEntryInjectionTest.assertFields(this);
+        final Field[] fields = this.getClass().getDeclaredFields();
+		
+		for (Field field : fields) {
+		    field.setAccessible(true);
+		    Assert.assertNotNull(field.getName(), field.get(this));
+		}
     }
 }
\ No newline at end of file

Modified: openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/ServletResourceEnvEntryInjectionTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/ServletResourceEnvEntryInjectionTest.java?rev=1178985&r1=1178984&r2=1178985&view=diff
==============================================================================
--- openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/ServletResourceEnvEntryInjectionTest.java
(original)
+++ openejb/trunk/arquillian-tomee/arquillian-tomee-tests/src/test/java/org/apache/openejb/arquillian/tests/resenventry/ServletResourceEnvEntryInjectionTest.java
Tue Oct  4 22:26:38 2011
@@ -45,7 +45,7 @@ public class ServletResourceEnvEntryInje
 
     @Deployment(testable = false)
     public static WebArchive getArchive() {
-        return new ServletResourceEnvEntryInjectionTest().createDeployment(TestRun.class,
ServletResourceEnvEntryInjectionTest.class, Blue.class, Red.class, Green.class, Orange.class,
Purple.class);
+        return new ServletResourceEnvEntryInjectionTest().createDeployment(TestRun.class,
Blue.class, Red.class, Green.class, Orange.class, Purple.class);
     }
 }
 



Mime
View raw message