Search in sources :

Example 6 with HardcodedModuleFactoriesResolver

use of org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver in project controller by opendaylight.

the class ImmediateEventExecutorModuleTest method setUp.

@Before
public void setUp() {
    factory = new ImmediateEventExecutorModuleFactory();
    super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(mockedContext, factory));
}
Also used : HardcodedModuleFactoriesResolver(org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver) Before(org.junit.Before)

Example 7 with HardcodedModuleFactoriesResolver

use of org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver in project controller by opendaylight.

the class NettyThreadgroupModuleTest method setUp.

@SuppressWarnings({ "rawtypes", "unchecked" })
@Before
public void setUp() throws Exception {
    factory = new NettyThreadgroupModuleFactory();
    super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(mockedContext, factory));
    Filter mockFilter = mock(Filter.class);
    doReturn("mock").when(mockFilter).toString();
    doReturn(mockFilter).when(mockedContext).createFilter(anyString());
    doNothing().when(mockedContext).addServiceListener(any(ServiceListener.class), anyString());
    ServiceReference mockServiceRef = mock(ServiceReference.class);
    doReturn(new ServiceReference[] { mockServiceRef }).when(mockedContext).getServiceReferences(anyString(), anyString());
    doReturn(mock(EventLoopGroup.class)).when(mockedContext).getService(mockServiceRef);
}
Also used : ServiceListener(org.osgi.framework.ServiceListener) EventLoopGroup(io.netty.channel.EventLoopGroup) Filter(org.osgi.framework.Filter) HardcodedModuleFactoriesResolver(org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver) ServiceReference(org.osgi.framework.ServiceReference) Before(org.junit.Before)

Example 8 with HardcodedModuleFactoriesResolver

use of org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver in project controller by opendaylight.

the class NetconfTestImplModuleTest method setUp.

@Before
public void setUp() {
    this.factory = new NetconfTestImplModuleFactory();
    super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(this.mockedContext, this.factory, new DepTestImplModuleFactory(), new IdentityTestModuleFactory()));
}
Also used : HardcodedModuleFactoriesResolver(org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver) Before(org.junit.Before)

Example 9 with HardcodedModuleFactoriesResolver

use of org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver in project controller by opendaylight.

the class MockedDependenciesTest method setUp.

@Before
public void setUp() {
    ClassBasedModuleFactory mockedThreadPoolConfigFactory = new ClassBasedModuleFactory(threadPoolImplementationName, MockedThreadPoolModule.class);
    super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(mockedContext, new TestingParallelAPSPModuleFactory(), mockedThreadPoolConfigFactory));
}
Also used : TestingParallelAPSPModuleFactory(org.opendaylight.controller.config.manager.testingservices.parallelapsp.TestingParallelAPSPModuleFactory) ClassBasedModuleFactory(org.opendaylight.controller.config.manager.impl.ClassBasedModuleFactory) HardcodedModuleFactoriesResolver(org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver) Before(org.junit.Before)

Aggregations

HardcodedModuleFactoriesResolver (org.opendaylight.controller.config.manager.impl.factoriesresolver.HardcodedModuleFactoriesResolver)9 Before (org.junit.Before)8 ModuleFactoriesResolver (org.opendaylight.controller.config.manager.impl.factoriesresolver.ModuleFactoriesResolver)2 TestingParallelAPSPModuleFactory (org.opendaylight.controller.config.manager.testingservices.parallelapsp.TestingParallelAPSPModuleFactory)2 TestingFixedThreadPoolModuleFactory (org.opendaylight.controller.config.manager.testingservices.threadpool.TestingFixedThreadPoolModuleFactory)2 Filter (org.osgi.framework.Filter)2 ServiceListener (org.osgi.framework.ServiceListener)2 ServiceReference (org.osgi.framework.ServiceReference)2 EventLoopGroup (io.netty.channel.EventLoopGroup)1 EventExecutor (io.netty.util.concurrent.EventExecutor)1 Test (org.junit.Test)1 AbstractLockedPlatformMBeanServerTest (org.opendaylight.controller.config.manager.impl.AbstractLockedPlatformMBeanServerTest)1 ClassBasedModuleFactory (org.opendaylight.controller.config.manager.impl.ClassBasedModuleFactory)1 ConfigRegistryImpl (org.opendaylight.controller.config.manager.impl.ConfigRegistryImpl)1 TestingScheduledThreadPoolModuleFactory (org.opendaylight.controller.config.manager.testingservices.scheduledthreadpool.TestingScheduledThreadPoolModuleFactory)1 ModuleFactory (org.opendaylight.controller.config.spi.ModuleFactory)1 ConfigTransactionJMXClient (org.opendaylight.controller.config.util.ConfigTransactionJMXClient)1 TestImplModuleFactory (org.opendaylight.controller.config.yang.test.impl.TestImplModuleFactory)1 BundleContext (org.osgi.framework.BundleContext)1