Update port-mapping model with port states
[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.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
15 public abstract class AbstractTest {
16
17     private static DataStoreContext dataStoreContextUtil = new DataStoreContextImpl();
18
19     public static DataBroker getDataBroker() {
20         return dataStoreContextUtil.getDataBroker();
21     }
22
23     public DataBroker getNewDataBroker() {
24         DataStoreContext dataStoreContext = new DataStoreContextImpl();
25         return dataStoreContext.getDataBroker();
26     }
27
28     public DOMDataBroker getDOMDataBroker() {
29         return dataStoreContextUtil.getDOMDataBroker();
30     }
31
32     public static DataStoreContext getDataStoreContextUtil() {
33         return dataStoreContextUtil;
34     }
35
36     public NotificationPublishService getNotificationPublishService() {
37         return dataStoreContextUtil.getNotificationPublishService();
38     }
39
40     public NotificationService getNotificationService() {
41         return dataStoreContextUtil.getNotificationService();
42     }
43
44 }