2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.sal.binding.test;
10 import org.junit.Before;
11 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
12 import org.opendaylight.controller.sal.binding.test.util.BindingBrokerTestFactory;
13 import org.opendaylight.controller.sal.binding.test.util.BindingTestContext;
14 import org.opendaylight.yangtools.yang.data.impl.codec.BindingIndependentMappingService;
16 import com.google.common.util.concurrent.ListeningExecutorService;
17 import com.google.common.util.concurrent.MoreExecutors;
19 @SuppressWarnings("deprecation")
20 public abstract class AbstractDataServiceTest {
22 protected org.opendaylight.controller.sal.core.api.data.DataProviderService biDataService;
23 protected DataProviderService baDataService;
24 protected BindingIndependentMappingService mappingService;
25 protected BindingTestContext testContext;
29 ListeningExecutorService executor = MoreExecutors.sameThreadExecutor();
30 BindingBrokerTestFactory factory = new BindingBrokerTestFactory();
31 factory.setExecutor(executor);
32 factory.setStartWithParsedSchema(getStartWithSchema());
33 testContext = factory.getTestContext();
36 baDataService = testContext.getBindingDataBroker();
37 biDataService = testContext.getDomDataBroker();
38 mappingService = testContext.getBindingToDomMappingService();
41 protected boolean getStartWithSchema() {