openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1820285 - /openwebbeans/meecrowave/trunk/meecrowave-junit/src/main/java/org/apache/meecrowave/junit5/MonoMeecrowaveExtension.java
Date Fri, 05 Jan 2018 11:31:51 GMT
Author: rmannibucau
Date: Fri Jan  5 11:31:51 2018
New Revision: 1820285

URL: http://svn.apache.org/viewvc?rev=1820285&view=rev
Log:
MEECROWAVE-90 fixing JUnit 5 integration

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-junit/src/main/java/org/apache/meecrowave/junit5/MonoMeecrowaveExtension.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-junit/src/main/java/org/apache/meecrowave/junit5/MonoMeecrowaveExtension.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-junit/src/main/java/org/apache/meecrowave/junit5/MonoMeecrowaveExtension.java?rev=1820285&r1=1820284&r2=1820285&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-junit/src/main/java/org/apache/meecrowave/junit5/MonoMeecrowaveExtension.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-junit/src/main/java/org/apache/meecrowave/junit5/MonoMeecrowaveExtension.java
Fri Jan  5 11:31:51 2018
@@ -20,7 +20,6 @@ package org.apache.meecrowave.junit5;
 
 import javax.enterprise.context.spi.CreationalContext;
 
-import org.apache.meecrowave.Meecrowave;
 import org.apache.meecrowave.testing.Injector;
 import org.apache.meecrowave.testing.MonoBase;
 import org.junit.jupiter.api.extension.AfterEachCallback;
@@ -33,18 +32,20 @@ public class MonoMeecrowaveExtension imp
     private static final ExtensionContext.Namespace NAMESPACE = ExtensionContext.Namespace.create(MonoMeecrowaveExtension.class.getName());
 
     @Override
-    public void beforeAll(final ExtensionContext context) throws Exception {
-        context.getStore(NAMESPACE).put(Meecrowave.Builder.class.getName(), BASE.startIfNeeded());
+    public void beforeAll(final ExtensionContext context) {
+        context.getStore(NAMESPACE).put(MonoBase.Instance.class.getName(), BASE.startIfNeeded());
     }
 
     @Override
-    public void beforeEach(final ExtensionContext context) throws Exception {
+    public void beforeEach(final ExtensionContext context) {
         context.getStore(NAMESPACE).put(CreationalContext.class.getName(), Injector.inject(context.getTestInstance().orElse(null)));
-        Injector.injectConfig(Meecrowave.Builder.class.cast(context.getStore(NAMESPACE).get(Meecrowave.Builder.class.getName())),
context.getTestInstance().orElse(null));
+        Injector.injectConfig(
+                MonoBase.Instance.class.cast(context.getStore(NAMESPACE).get(MonoBase.Instance.class.getName())).getConfiguration(),
+                context.getTestInstance().orElse(null));
     }
 
     @Override
-    public void afterEach(final ExtensionContext context) throws Exception {
+    public void afterEach(final ExtensionContext context) {
         CreationalContext.class.cast(context.getStore(NAMESPACE).get(CreationalContext.class.getName())).release();
     }
 }



Mime
View raw message