openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1802041 - /openwebbeans/trunk/webbeans-se/src/test/java/org/apache/openwebbeans/se/CDISETest.java
Date Sun, 16 Jul 2017 10:16:43 GMT
Author: rmannibucau
Date: Sun Jul 16 10:16:43 2017
New Revision: 1802041

URL: http://svn.apache.org/viewvc?rev=1802041&view=rev
Log:
OWB-1199 auto scanning test - based on John D. Ament patch

Modified:
    openwebbeans/trunk/webbeans-se/src/test/java/org/apache/openwebbeans/se/CDISETest.java

Modified: openwebbeans/trunk/webbeans-se/src/test/java/org/apache/openwebbeans/se/CDISETest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-se/src/test/java/org/apache/openwebbeans/se/CDISETest.java?rev=1802041&r1=1802040&r2=1802041&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-se/src/test/java/org/apache/openwebbeans/se/CDISETest.java
(original)
+++ openwebbeans/trunk/webbeans-se/src/test/java/org/apache/openwebbeans/se/CDISETest.java
Sun Jul 16 10:16:43 2017
@@ -20,6 +20,7 @@ package org.apache.openwebbeans.se;
 
 import org.junit.Test;
 
+import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.inject.se.SeContainer;
 import javax.enterprise.inject.se.SeContainerInitializer;
 
@@ -63,7 +64,20 @@ public class CDISETest
         }
     }
 
+    @Test
+    public void discovery() {
+        // regular discovery
+        try (final SeContainer container = SeContainerInitializer.newInstance()
+                .initialize()) {
+            assertTrue(container.isRunning());
+            assertTrue(container.select(Scanned.class).isResolvable());
+        }
+    }
+
     public static class ImNotScanned {
+    }
 
+    @ApplicationScoped
+    public static class Scanned {
     }
 }



Mime
View raw message