Service-notification handling for serviceHandler
[transportpce.git] / test-common / src / main / java / org / opendaylight / transportpce / test / AbstractTest.java
1 /*
2  * Copyright © 2016 AT&T and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.transportpce.test;
9
10 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
11 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
12 import org.opendaylight.controller.md.sal.binding.api.NotificationService;
13 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
14 import org.opendaylight.transportpce.test.common.DataStoreContext;
15 import org.opendaylight.transportpce.test.common.DataStoreContextImpl;
16
17 public abstract class AbstractTest {
18
19     private final DataStoreContext dataStoreContextUtil;
20
21     protected AbstractTest() {
22         dataStoreContextUtil = new DataStoreContextImpl();
23     }
24
25     public DataBroker getDataBroker() {
26         return dataStoreContextUtil.getDataBroker();
27     }
28
29     public DOMDataBroker getDOMDataBroker() {
30         return dataStoreContextUtil.getDOMDataBroker();
31     }
32
33     public DataStoreContext getDataStoreContextUtil() {
34         return dataStoreContextUtil;
35     }
36
37     public NotificationPublishService getNotificationPublishService() {
38         return dataStoreContextUtil.getNotificationPublishService();
39     }
40
41     public NotificationService getNotificationService() {
42         return dataStoreContextUtil.getNotificationService();
43     }
44
45 }