Search in sources :

Example 1 with BindingBrokerTestFactory

use of org.opendaylight.controller.sal.binding.test.util.BindingBrokerTestFactory in project controller by opendaylight.

the class AbstractDataServiceTest method setUp.

@Before
public void setUp() {
    ListeningExecutorService executor = MoreExecutors.newDirectExecutorService();
    BindingBrokerTestFactory factory = new BindingBrokerTestFactory();
    factory.setExecutor(executor);
    factory.setStartWithParsedSchema(getStartWithSchema());
    testContext = factory.getTestContext();
    testContext.start();
}
Also used : BindingBrokerTestFactory(org.opendaylight.controller.sal.binding.test.util.BindingBrokerTestFactory) ListeningExecutorService(com.google.common.util.concurrent.ListeningExecutorService) Before(org.junit.Before)

Example 2 with BindingBrokerTestFactory

use of org.opendaylight.controller.sal.binding.test.util.BindingBrokerTestFactory in project controller by opendaylight.

the class CrossBrokerMountPointTest method setup.

@Before
public void setup() {
    final BindingBrokerTestFactory testFactory = new BindingBrokerTestFactory();
    testFactory.setExecutor(MoreExecutors.newDirectExecutorService());
    testFactory.setStartWithParsedSchema(true);
    testContext = testFactory.getTestContext();
    testContext.start();
    bindingMountPointService = testContext.getBindingMountPointService();
    domMountPointService = testContext.getDomMountProviderService();
    // biRpcInvoker = testContext.getDomRpcInvoker();
    assertNotNull(bindingMountPointService);
    assertNotNull(domMountPointService);
// flowService = MessageCapturingFlowService.create(baRpcRegistry);
}
Also used : BindingBrokerTestFactory(org.opendaylight.controller.sal.binding.test.util.BindingBrokerTestFactory) Before(org.junit.Before)

Example 3 with BindingBrokerTestFactory

use of org.opendaylight.controller.sal.binding.test.util.BindingBrokerTestFactory in project controller by opendaylight.

the class CrossBrokerRpcTest method setup.

@Before
public void setup() {
    BindingBrokerTestFactory testFactory = new BindingBrokerTestFactory();
    testFactory.setExecutor(MoreExecutors.newDirectExecutorService());
    testFactory.setStartWithParsedSchema(true);
    testContext = testFactory.getTestContext();
    testContext.start();
    providerRegistry = testContext.getBindingRpcRegistry();
    provisionRegistry = testContext.getDomRpcRegistry();
    biRpcInvoker = testContext.getDomRpcInvoker();
    assertNotNull(providerRegistry);
    assertNotNull(provisionRegistry);
    knockService = MessageCapturingFlowService.create(providerRegistry);
}
Also used : BindingBrokerTestFactory(org.opendaylight.controller.sal.binding.test.util.BindingBrokerTestFactory) Before(org.junit.Before)

Example 4 with BindingBrokerTestFactory

use of org.opendaylight.controller.sal.binding.test.util.BindingBrokerTestFactory in project controller by opendaylight.

the class DOMRpcServiceTestBugfix560 method setUp.

/**
 * @throws java.lang.Exception
 */
@Before
public void setUp() throws Exception {
    final BindingBrokerTestFactory testFactory = new BindingBrokerTestFactory();
    testFactory.setExecutor(MoreExecutors.newDirectExecutorService());
    testFactory.setStartWithParsedSchema(true);
    testContext = testFactory.getTestContext();
    testContext.start();
    domMountPointService = testContext.getDomMountProviderService();
    bindingMountPointService = testContext.getBindingMountPointService();
    assertNotNull(domMountPointService);
    final YangModuleInfo moduleInfo = BindingReflections.getModuleInfo(OpendaylightTestRpcServiceService.class);
    assertNotNull(moduleInfo);
    schemaContext = YangParserTestUtils.parseYangSources(StatementParserMode.DEFAULT_MODE, null, YangTextSchemaSource.delegateForByteSource(RevisionSourceIdentifier.create(moduleInfo.getName().getLocalName(), moduleInfo.getName().getRevision()), moduleInfo.getYangTextByteSource()));
}
Also used : YangModuleInfo(org.opendaylight.yangtools.yang.binding.YangModuleInfo) BindingBrokerTestFactory(org.opendaylight.controller.sal.binding.test.util.BindingBrokerTestFactory) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)4 BindingBrokerTestFactory (org.opendaylight.controller.sal.binding.test.util.BindingBrokerTestFactory)4 ListeningExecutorService (com.google.common.util.concurrent.ListeningExecutorService)1 YangModuleInfo (org.opendaylight.yangtools.yang.binding.YangModuleInfo)1