import org.opendaylight.aaa.simple.AAAWiring;
import org.opendaylight.controller.simple.ControllerWiring;
import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
@Ignore // TODO fix NullPointerException at org.opendaylight.aaa.cert.impl.DefaultMdsalSslData.createKeyStores :155
public class AAAWiringTest extends AbstractSimpleDistributionTest {
- public @Rule GuiceRule guice = new GuiceRule(new AAAWiring(), new ControllerWiring(),
+ public @Rule GuiceRule2 guice = new GuiceRule2(new AAAWiring(), new ControllerWiring(),
// TODO new WebWiring(true), new ReferencesWiring(),
new AnnotationsModule());
import org.junit.Rule;
import org.opendaylight.controller.simple.ControllerWiring;
import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
public class ControllerWiringTest extends AbstractSimpleDistributionTest {
- public @Rule GuiceRule guice = new GuiceRule(ControllerWiring.class, AnnotationsModule.class);
+ public @Rule GuiceRule2 guice = new GuiceRule2(ControllerWiring.class, AnnotationsModule.class);
}
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.GuiceRule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
/**
* Test PreDestroy in Module.
@Test public void testModuleWithPreDestroy() throws Throwable {
@SuppressWarnings("resource")
TestModule testModule = new TestModule();
- new GuiceRule(testModule, new AnnotationsModule()).apply(EMPTY_STATEMENT, null, new Object()).evaluate();
+ new GuiceRule2(testModule, new AnnotationsModule()).apply(EMPTY_STATEMENT, null, new Object()).evaluate();
assertThat(testModule.isClosed).isTrue();
}
import org.junit.Rule;
import org.junit.Test;
import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
/**
public class GuiceRuleLambdaTest {
@SuppressWarnings("BindingToUnqualifiedCommonType")
- public @Rule GuiceRule guice = new GuiceRule2(
+ public @Rule GuiceRule2 guice = new GuiceRule2(
binder -> binder.bind(String.class).toInstance("hello, world"),
new AnnotationsModule());
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.GuiceRule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
import org.opendaylight.infrautils.simple.DiagStatusWiring;
import org.opendaylight.infrautils.simple.ReadyWiring;
import org.opendaylight.infrautils.web.WebWiring;
*/
public class DiagStatusWiringTest {
- public @Rule GuiceRule guice = new GuiceRule(WebWiring.class, DiagStatusWiring.class, ReadyWiring.class,
+ public @Rule GuiceRule2 guice = new GuiceRule2(WebWiring.class, DiagStatusWiring.class, ReadyWiring.class,
AnnotationsModule.class);
@Inject DiagStatusService diagStatusService;
import org.opendaylight.controller.simple.ControllerWiring;
import org.opendaylight.infrautils.inject.guice.GuiceClassPathBinder;
import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
import org.opendaylight.infrautils.simple.DiagStatusWiring;
import org.opendaylight.infrautils.simple.ReadyWiring;
import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
private static final GuiceClassPathBinder CLASS_PATH_BINDER = new GuiceClassPathBinder("org.opendaylight");
- public @Rule GuiceRule guice = new GuiceRule(new OpenFlowPluginWiring(CLASS_PATH_BINDER), new ServiceUtilsWiring(),
- new ControllerWiring(), new DiagStatusWiring(), new WebWiring(), new ReadyWiring(),
- new AnnotationsModule());
+ public @Rule GuiceRule2 guice = new GuiceRule2(new OpenFlowPluginWiring(CLASS_PATH_BINDER),
+ new ServiceUtilsWiring(), new ControllerWiring(), new DiagStatusWiring(), new WebWiring(),
+ new ReadyWiring(), new AnnotationsModule());
@Inject OpenFlowPluginProvider ofpProvider;
@Inject OpenflowProviderConfig ofpConfig;
@Inject ForwardingRulesManagerConfig frmConfig;
- @Test public void testConfig() {
+ @Test public void testConfig() throws InterruptedException {
assertThat(ofpConfig.getGlobalNotificationQuota()).named("globalNotificationQuota").isEqualTo(64000L);
assertThat(frmConfig.getReconciliationRetryCount()).named("reconciliationRetryCount").isEqualTo(5);
}
import org.opendaylight.aaa.web.WebServer;
import org.opendaylight.controller.simple.ControllerWiring;
import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
import org.opendaylight.infrautils.testutils.TestHttpClient;
*/
public class RestConfModuleTest extends AbstractSimpleDistributionTest {
- public @Rule GuiceRule guice = new GuiceRule2(
+ public @Rule GuiceRule2 guice = new GuiceRule2(
RestConfModule.class, ControllerWiring.class, WebWiring.class, AnnotationsModule.class);
@Inject WebServer webServer;
import org.junit.Rule;
import org.opendaylight.controller.simple.ControllerWiring;
import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
-import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule2;
import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
import org.opendaylight.serviceutils.simple.ServiceUtilsWiring;
import org.opendaylight.serviceutils.upgrade.UpgradeState;
*/
public class ServiceUtilsModuleTest extends AbstractSimpleDistributionTest {
- public @Rule GuiceRule guice = new GuiceRule(ServiceUtilsWiring.class, ControllerWiring.class,
+ public @Rule GuiceRule2 guice = new GuiceRule2(ServiceUtilsWiring.class, ControllerWiring.class,
AnnotationsModule.class);
@Inject UpgradeState upgradeState;