remove the now upstreamed GuiceRule2 & ReadyModule
authorMichael Vorburger <mike@vorburger.ch>
Sat, 22 Dec 2018 02:45:26 +0000 (03:45 +0100)
committerMichael Vorburger <mike@vorburger.ch>
Wed, 1 Jul 2020 23:38:20 +0000 (01:38 +0200)
and replace all usages of GuiceRule2 with GuiceRule

see https://git.opendaylight.org/gerrit/#/c/78983/

Signed-off-by: Michael Vorburger <mike@vorburger.ch>
21 files changed:
TODO.md
src/main/java/org/opendaylight/infrautils/inject/PostFullSystemInjectionListener.java [deleted file]
src/main/java/org/opendaylight/infrautils/inject/guice/testutils/GuiceRule2.java [deleted file]
src/main/java/org/opendaylight/infrautils/simple/InfraUtilsModule.java
src/main/java/org/opendaylight/infrautils/simple/ReadyModule.java [deleted file]
src/test/java/org/opendaylight/aaa/simple/test/AAAModuleTest.java
src/test/java/org/opendaylight/aaa/simple/test/CertModuleTest.java
src/test/java/org/opendaylight/aaa/simple/test/EncryptModuleTest.java
src/test/java/org/opendaylight/controller/simple/test/InMemoryControllerModuleTest.java
src/test/java/org/opendaylight/genius/simple/test/GeniusSimpleDistributionTest.java
src/test/java/org/opendaylight/infrautils/inject/guice/tests/AbstractCloseableModuleTest.java
src/test/java/org/opendaylight/infrautils/inject/guice/testutils/tests/GuiceRuleLambdaTest.java
src/test/java/org/opendaylight/infrautils/simple/test/DiagStatusModuleTest.java
src/test/java/org/opendaylight/infrautils/simple/test/MainTest.java
src/test/java/org/opendaylight/infrautils/simple/test/ReadyModuleTest.java [deleted file]
src/test/java/org/opendaylight/mdsal/simple/test/InMemoryMdsalModuleTest.java
src/test/java/org/opendaylight/netvirt/simple/test/NetvirtSimpleDistributionTest.java
src/test/java/org/opendaylight/neutron/simple/test/NeutronModuleTest.java
src/test/java/org/opendaylight/openflowplugin/simple/test/OpenFlowPluginModuleTest.java
src/test/java/org/opendaylight/restconf/simple/test/RestConfModuleTest.java
src/test/java/org/opendaylight/serviceutils/simple/test/ServiceUtilsModuleTest.java

diff --git a/TODO.md b/TODO.md
index 2af0e6f9d022b75429b5d172c865cfb002de3264..59113406adee84cb21d8dedc51ade69a3fde7387 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -54,7 +54,7 @@
 
 - [ ] dependency convergence with Maven Enforcer plugin
 
-- [ ] add all *Wiring+++ upstream, and make the project disappear (incl GuiceRule2 etc.)
+- [ ] add all *Wiring+++ upstream, and make the project disappear
 
 - [ ] headless distribution without shell
 
diff --git a/src/main/java/org/opendaylight/infrautils/inject/PostFullSystemInjectionListener.java b/src/main/java/org/opendaylight/infrautils/inject/PostFullSystemInjectionListener.java
deleted file mode 100644 (file)
index 49d7cf5..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.infrautils.inject;
-
-/**
- * Callback invoked when system injection is fully complete.
- *
- * @author Michael Vorburger.ch
- */
-public interface PostFullSystemInjectionListener {
-
-    void onFullSystemInjected();
-
-}
diff --git a/src/main/java/org/opendaylight/infrautils/inject/guice/testutils/GuiceRule2.java b/src/main/java/org/opendaylight/infrautils/inject/guice/testutils/GuiceRule2.java
deleted file mode 100644 (file)
index 82b1e1b..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.infrautils.inject.guice.testutils;
-
-import com.google.inject.ConfigurationException;
-import com.google.inject.Module;
-import org.opendaylight.infrautils.inject.PostFullSystemInjectionListener;
-
-public class GuiceRule2 extends GuiceRule {
-
-    @SafeVarargs
-    public GuiceRule2(Class<? extends Module>... moduleClasses) {
-        super(moduleClasses);
-    }
-
-    public GuiceRule2(Module... modules) {
-        super(modules);
-    }
-
-    @Override
-    protected void setUpGuice(Object target) {
-        super.setUpGuice(target);
-        try {
-            injector.getInstance(PostFullSystemInjectionListener.class).onFullSystemInjected();
-        } catch (ConfigurationException e) {
-            // It's OK if we didn't bind a PostFullSystemInjectionListener.
-        }
-    }
-}
index 082740aadcd7644bfd2b9e5f4c3584d0085b00ad..7544e63524d8015bd4abb04a461bf7c511396e9c 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.infrautils.simple;
 
 import com.google.inject.AbstractModule;
+import org.opendaylight.infrautils.ready.guice.ReadyModule;
 import org.opendaylight.infrautils.web.WebModule;
 
 public class InfraUtilsModule extends AbstractModule {
diff --git a/src/main/java/org/opendaylight/infrautils/simple/ReadyModule.java b/src/main/java/org/opendaylight/infrautils/simple/ReadyModule.java
deleted file mode 100644 (file)
index 5b144ce..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.infrautils.simple;
-
-import com.google.inject.AbstractModule;
-import org.opendaylight.infrautils.inject.PostFullSystemInjectionListener;
-import org.opendaylight.infrautils.ready.SystemReadyMonitor;
-import org.opendaylight.infrautils.ready.spi.SimpleSystemReadyMonitor;
-
-public class ReadyModule extends AbstractModule implements PostFullSystemInjectionListener {
-
-    private final SimpleSystemReadyMonitor systemReadyMonitor = new SimpleSystemReadyMonitor();
-
-    @Override
-    protected void configure() {
-        bind(SystemReadyMonitor.class).toInstance(systemReadyMonitor);
-        bind(PostFullSystemInjectionListener.class).toInstance(this);
-    }
-
-    @Override
-    public void onFullSystemInjected() {
-        systemReadyMonitor.ready();
-    }
-}
index db67472870cfc5473ff03226bb3393e2f200e544..24dd1036b16fc403477596ba6835e34aa3d639f8 100644 (file)
@@ -12,13 +12,13 @@ import org.junit.Rule;
 import org.opendaylight.aaa.simple.AAAModule;
 import org.opendaylight.controller.simple.InMemoryControllerModule;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
 
 @Ignore // TODO fix NullPointerException at org.opendaylight.aaa.cert.impl.DefaultMdsalSslData.createKeyStores :155
 public class AAAModuleTest extends AbstractSimpleDistributionTest {
 
-    public @Rule GuiceRule2 guice = new GuiceRule2(new AAAModule(), new InMemoryControllerModule(),
+    public @Rule GuiceRule guice = new GuiceRule(new AAAModule(), new InMemoryControllerModule(),
             // TODO new WebWiring(true), new ReferencesWiring(),
             new AnnotationsModule());
 
index 5bc9bcedfcad8ed428f8b1ea17b2c9c5f7919e73..6085fe9433bab30cb2705bb64760fb80fa0c0937 100644 (file)
@@ -13,12 +13,12 @@ import org.opendaylight.aaa.cert.api.ICertificateManager;
 import org.opendaylight.aaa.simple.CertModule;
 import org.opendaylight.controller.simple.InMemoryControllerModule;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
 
 public class CertModuleTest extends AbstractSimpleDistributionTest {
 
-    public @Rule GuiceRule2 guice = new GuiceRule2(
+    public @Rule GuiceRule guice = new GuiceRule(
             new CertModule(), new InMemoryControllerModule(), new AnnotationsModule());
 
     @Inject ICertificateManager certificateManager;
index 00a3716f414cc0f01c003969e28e8dbaa804f94e..559b776c69740d4f383453abd74ecbce0c5a3e92 100644 (file)
@@ -13,12 +13,12 @@ import org.opendaylight.aaa.encrypt.AAAEncryptionService;
 import org.opendaylight.aaa.simple.EncryptModule;
 import org.opendaylight.controller.simple.InMemoryControllerModule;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
 
 public class EncryptModuleTest extends AbstractSimpleDistributionTest {
 
-    public @Rule GuiceRule2 guice = new GuiceRule2(
+    public @Rule GuiceRule guice = new GuiceRule(
             new EncryptModule(), new InMemoryControllerModule(), new AnnotationsModule());
 
     @Inject AAAEncryptionService encryptionService;
index c71dd2725d6897d18f919080995a0791f1f6d637..d96e4697cb159bc373028a7cc8cdf049feb16297 100644 (file)
@@ -15,13 +15,13 @@ import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.NotificationService;
 import org.opendaylight.controller.simple.InMemoryControllerModule;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
 import org.opendaylight.mdsal.simple.PingPong;
 
 public class InMemoryControllerModuleTest extends AbstractSimpleDistributionTest {
 
-    public @Rule GuiceRule2 guice = new GuiceRule2(InMemoryControllerModule.class, AnnotationsModule.class);
+    public @Rule GuiceRule guice = new GuiceRule(InMemoryControllerModule.class, AnnotationsModule.class);
 
     @Inject DataBroker dataBroker;
     @Inject @PingPong DataBroker pingPongDataBroker;
index c7bb566ee54d1261bbc3bac78b794a35da908ff4..39f62cde07881776f92eabc0f4c1f15b2a96d811 100644 (file)
@@ -13,7 +13,7 @@ import org.opendaylight.genius.interfacemanager.interfaces.InterfaceManagerServi
 import org.opendaylight.genius.itm.api.IITMProvider;
 import org.opendaylight.genius.simple.GeniusModule;
 import org.opendaylight.infrautils.inject.guice.GuiceClassPathBinder;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 import org.opendaylight.infrautils.simple.ShellTestModule;
 import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
 
@@ -29,7 +29,7 @@ public class GeniusSimpleDistributionTest extends AbstractSimpleDistributionTest
 
     private static final GuiceClassPathBinder CLASS_PATH_BINDER = new GuiceClassPathBinder("org.opendaylight");
 
-    public @Rule GuiceRule2 guice = new GuiceRule2(new GeniusModule(CLASS_PATH_BINDER), new ShellTestModule());
+    public @Rule GuiceRule guice = new GuiceRule(new GeniusModule(CLASS_PATH_BINDER), new ShellTestModule());
 
     @Inject InterfaceManagerService interfaceManagerService;
 
index 87bd0560982ff60a24597e9dbfe2171857661b9c..5c6f01ff5ef14ba946888e0a89220cdf82726d57 100644 (file)
@@ -13,7 +13,7 @@ import org.junit.Test;
 import org.junit.runners.model.Statement;
 import org.opendaylight.infrautils.inject.guice.AbstractCloseableModule;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 
 /**
  * Test PreDestroy in Module.
@@ -39,7 +39,7 @@ public class AbstractCloseableModuleTest {
     @Test public void testModuleWithPreDestroy() throws Throwable {
         @SuppressWarnings("resource")
         TestModule testModule = new TestModule();
-        new GuiceRule2(testModule, new AnnotationsModule()).apply(EMPTY_STATEMENT, null, new Object()).evaluate();
+        new GuiceRule(testModule, new AnnotationsModule()).apply(EMPTY_STATEMENT, null, new Object()).evaluate();
         assertThat(testModule.isClosed).isTrue();
     }
 
index 4d40bdb73f2b9b94e80eae9d0aa73002264a851d..57ef7b48d91c359bbf55f2c3721bc821d1a8a5b3 100644 (file)
@@ -13,7 +13,7 @@ import javax.inject.Inject;
 import org.junit.Rule;
 import org.junit.Test;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 
 /**
  * Test illustrating how to use the GuiceRule with an inline lamda binding.
@@ -23,7 +23,7 @@ import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
 public class GuiceRuleLambdaTest {
 
     @SuppressWarnings("BindingToUnqualifiedCommonType")
-    public @Rule GuiceRule2 guice = new GuiceRule2(
+    public @Rule GuiceRule guice = new GuiceRule(
         binder -> binder.bind(String.class).toInstance("hello, world"),
         new AnnotationsModule());
 
index ce649ecad0c463e2e6a35aede3e0f2f640222b2e..9d27653db26f671ac448efe57b30477e97fe79c2 100644 (file)
@@ -12,9 +12,9 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.opendaylight.infrautils.diagstatus.DiagStatusService;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.ready.guice.ReadyModule;
 import org.opendaylight.infrautils.simple.DiagStatusModule;
-import org.opendaylight.infrautils.simple.ReadyModule;
 import org.opendaylight.infrautils.web.WebModule;
 
 /**
@@ -24,7 +24,7 @@ import org.opendaylight.infrautils.web.WebModule;
  */
 public class DiagStatusModuleTest {
 
-    public @Rule GuiceRule2 guice = new GuiceRule2(WebModule.class, DiagStatusModule.class, ReadyModule.class,
+    public @Rule GuiceRule guice = new GuiceRule(WebModule.class, DiagStatusModule.class, ReadyModule.class,
             AnnotationsModule.class);
 
     @Inject DiagStatusService diagStatusService;
index dd3213c40133cfbd921f330ad16baff401c6038d..1e5cab8606123b3a284dfbd9d5b3e85fd614653a 100644 (file)
@@ -9,8 +9,8 @@ package org.opendaylight.infrautils.simple.test;
 
 import org.junit.Test;
 import org.opendaylight.infrautils.inject.guice.testutils.AbstractGuiceJsr250Module;
+import org.opendaylight.infrautils.ready.guice.ReadyModule;
 import org.opendaylight.infrautils.simple.Main;
-import org.opendaylight.infrautils.simple.ReadyModule;
 
 /**
  * Unit test for Main.
diff --git a/src/test/java/org/opendaylight/infrautils/simple/test/ReadyModuleTest.java b/src/test/java/org/opendaylight/infrautils/simple/test/ReadyModuleTest.java
deleted file mode 100644 (file)
index aa052bf..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.infrautils.simple.test;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import javax.annotation.PostConstruct;
-import javax.inject.Inject;
-import org.junit.Rule;
-import org.junit.Test;
-import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
-import org.opendaylight.infrautils.ready.SystemReadyMonitor;
-import org.opendaylight.infrautils.simple.ReadyModule;
-
-/**
- * Unit test for {@link ReadyModule}.
- *
- * @author Michael Vorburger.ch
- */
-public class ReadyModuleTest {
-
-    public static class TestBean {
-        private final SystemReadyMonitor systemReadyMonitor;
-        boolean invokedReadyCallbackRegisteredInConstructor = false;
-        boolean invokedReadyCallbackRegisteredInPostConstruct = false;
-
-        @Inject public TestBean(SystemReadyMonitor systemReadyMonitor) {
-            this.systemReadyMonitor = systemReadyMonitor;
-            systemReadyMonitor.registerListener(() -> {
-                invokedReadyCallbackRegisteredInConstructor = true;
-            });
-        }
-
-        @PostConstruct public void init() {
-            systemReadyMonitor.registerListener(() -> {
-                invokedReadyCallbackRegisteredInPostConstruct = true;
-            });
-        }
-    }
-
-    public @Rule GuiceRule2 guice = new GuiceRule2(ReadyModule.class, AnnotationsModule.class);
-
-    @Inject TestBean testBean;
-
-    @Test public void testReadyListener() {
-        assertThat(testBean.invokedReadyCallbackRegisteredInConstructor).isTrue();
-        assertThat(testBean.invokedReadyCallbackRegisteredInPostConstruct).isTrue();
-    }
-
-}
index b67a4e65f7c68a5f56d00cb213eed85838eb2677..891715d3667b2bc6d80be79bdb71b21ec1103131 100644 (file)
@@ -13,7 +13,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.opendaylight.controller.simple.InMemoryControllerModule;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.RpcConsumerRegistry;
@@ -22,7 +22,7 @@ import org.opendaylight.mdsal.simple.PingPong;
 
 public class InMemoryMdsalModuleTest extends AbstractSimpleDistributionTest {
 
-    public @Rule GuiceRule2 guice = new GuiceRule2(InMemoryControllerModule.class, AnnotationsModule.class);
+    public @Rule GuiceRule guice = new GuiceRule(InMemoryControllerModule.class, AnnotationsModule.class);
 
     @Inject @PingPong DataBroker pingPongDataBroker;
     @Inject DataBroker dataBroker;
index 874bb81275e57f1f23d6dec255b4fecd3fe2b0fd..c060dce51a45a6dfdd6f756e1ccc586e41807359 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.netvirt.simple.test;
 import org.junit.Ignore;
 import org.junit.Rule;
 import org.opendaylight.infrautils.inject.guice.GuiceClassPathBinder;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 import org.opendaylight.infrautils.simple.ShellTestModule;
 import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
 import org.opendaylight.netvirt.simple.NetvirtModule;
@@ -25,6 +25,6 @@ public class NetvirtSimpleDistributionTest extends AbstractSimpleDistributionTes
 
     private static final GuiceClassPathBinder CLASS_PATH_BINDER = new GuiceClassPathBinder("org.opendaylight");
 
-    public @Rule GuiceRule2 guice = new GuiceRule2(new NetvirtModule(CLASS_PATH_BINDER), new ShellTestModule());
+    public @Rule GuiceRule guice = new GuiceRule(new NetvirtModule(CLASS_PATH_BINDER), new ShellTestModule());
 
 }
index ba1e92ba96d8ca0c3588b0662d6968b2aa8079d7..74cfd5959f80b103290cdf3f277e38e03a2df51d 100644 (file)
@@ -17,7 +17,7 @@ import org.junit.Test;
 import org.opendaylight.aaa.web.WebServer;
 import org.opendaylight.controller.simple.InMemoryControllerModule;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
 import org.opendaylight.infrautils.testutils.TestHttpClient;
 import org.opendaylight.infrautils.web.WebModule;
@@ -30,7 +30,7 @@ import org.opendaylight.neutron.simple.NeutronModule;
  */
 public class NeutronModuleTest extends AbstractSimpleDistributionTest {
 
-    public @Rule GuiceRule2 guice = new GuiceRule2(
+    public @Rule GuiceRule guice = new GuiceRule(
             NeutronModule.class, InMemoryControllerModule.class, WebModule.class, AnnotationsModule.class);
 
     @Inject WebServer webServer;
index 1dd28f4150f199725cf9a867157438860a9a3d83..58a0902b4de1454e964570d7d555843d95d1d00c 100644 (file)
@@ -15,9 +15,9 @@ import org.junit.Test;
 import org.opendaylight.controller.simple.InMemoryControllerModule;
 import org.opendaylight.infrautils.inject.guice.GuiceClassPathBinder;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.ready.guice.ReadyModule;
 import org.opendaylight.infrautils.simple.DiagStatusModule;
-import org.opendaylight.infrautils.simple.ReadyModule;
 import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
 import org.opendaylight.infrautils.web.WebModule;
 import org.opendaylight.openflowplugin.api.openflow.OpenFlowPluginProvider;
@@ -30,7 +30,7 @@ public class OpenFlowPluginModuleTest extends AbstractSimpleDistributionTest {
 
     private static final GuiceClassPathBinder CLASS_PATH_BINDER = new GuiceClassPathBinder("org.opendaylight");
 
-    public @Rule GuiceRule2 guice = new GuiceRule2(new OpenFlowPluginModule(CLASS_PATH_BINDER),
+    public @Rule GuiceRule guice = new GuiceRule(new OpenFlowPluginModule(CLASS_PATH_BINDER),
             new ServiceUtilsModule(), new InMemoryControllerModule(), new DiagStatusModule(), new WebModule(),
             new ReadyModule(), new AnnotationsModule());
 
index 9dc7f3a7c91bc8b899b0078a2f49144739f4fd5f..ed3286ad02c41d5572ceb934eff72169c28ea632 100644 (file)
@@ -17,7 +17,7 @@ import org.junit.Test;
 import org.opendaylight.aaa.web.WebServer;
 import org.opendaylight.controller.simple.InMemoryControllerModule;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
 import org.opendaylight.infrautils.testutils.TestHttpClient;
 import org.opendaylight.infrautils.web.WebModule;
@@ -30,7 +30,7 @@ import org.opendaylight.restconf.simple.RestConfModule;
  */
 public class RestConfModuleTest extends AbstractSimpleDistributionTest {
 
-    public @Rule GuiceRule2 guice = new GuiceRule2(
+    public @Rule GuiceRule guice = new GuiceRule(
             RestConfModule.class, InMemoryControllerModule.class, WebModule.class, AnnotationsModule.class);
 
     @Inject WebServer webServer;
index f6c18fa7db927f18691a1fd4a330523a22c0f234..027c9154bf3ec12e03c16ef7805bd297f965df88 100644 (file)
@@ -11,7 +11,7 @@ import javax.inject.Inject;
 import org.junit.Rule;
 import org.opendaylight.controller.simple.InMemoryControllerModule;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
 import org.opendaylight.serviceutils.simple.ServiceUtilsModule;
 import org.opendaylight.serviceutils.upgrade.UpgradeState;
@@ -23,7 +23,7 @@ import org.opendaylight.serviceutils.upgrade.UpgradeState;
  */
 public class ServiceUtilsModuleTest extends AbstractSimpleDistributionTest {
 
-    public @Rule GuiceRule2 guice = new GuiceRule2(ServiceUtilsModule.class, InMemoryControllerModule.class,
+    public @Rule GuiceRule guice = new GuiceRule(ServiceUtilsModule.class, InMemoryControllerModule.class,
             AnnotationsModule.class);
 
     @Inject UpgradeState upgradeState;