2 * Copyright © 2016 AT&T 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.transportpce.test;
10 import org.opendaylight.mdsal.binding.api.DataBroker;
11 import org.opendaylight.mdsal.binding.api.NotificationPublishService;
12 import org.opendaylight.mdsal.binding.api.NotificationService;
13 import org.opendaylight.mdsal.dom.api.DOMDataBroker;
14 import org.opendaylight.transportpce.common.DataStoreContext;
15 import org.opendaylight.transportpce.common.DataStoreContextImpl;
17 public abstract class AbstractTest {
19 private final DataStoreContext dataStoreContextUtil;
21 protected AbstractTest() {
22 dataStoreContextUtil = new DataStoreContextImpl();
25 public DataBroker getDataBroker() {
26 return dataStoreContextUtil.getDataBroker();
29 public DataBroker getNewDataBroker() {
30 DataStoreContext dataStoreContext = new DataStoreContextImpl();
31 return dataStoreContext.getDataBroker();
34 public DOMDataBroker getDOMDataBroker() {
35 return dataStoreContextUtil.getDOMDataBroker();
38 public DataStoreContext getDataStoreContextUtil() {
39 return dataStoreContextUtil;
42 public NotificationPublishService getNotificationPublishService() {
43 return dataStoreContextUtil.getNotificationPublishService();
46 public NotificationService getNotificationService() {
47 return dataStoreContextUtil.getNotificationService();