creates common test functions
[transportpce.git] / test-common / src / main / java / org / opendaylight / transportpce / test / AbstractTest.java
diff --git a/test-common/src/main/java/org/opendaylight/transportpce/test/AbstractTest.java b/test-common/src/main/java/org/opendaylight/transportpce/test/AbstractTest.java
new file mode 100644 (file)
index 0000000..571e706
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright © 2016 AT&T and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.transportpce.test;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
+import org.opendaylight.transportpce.test.common.DataStoreContext;
+import org.opendaylight.transportpce.test.common.DataStoreContextImpl;
+
+public abstract class AbstractTest {
+
+    private final DataStoreContext dataStoreContextUtil;
+
+    protected AbstractTest() {
+        dataStoreContextUtil = new DataStoreContextImpl();
+    }
+
+    public DataBroker getDataBroker() {
+        return dataStoreContextUtil.getDataBroker();
+    }
+
+    public DOMDataBroker getDOMDataBroker() {
+        return dataStoreContextUtil.getDOMDataBroker();
+    }
+
+    public DataStoreContext getDataStoreContextUtil() {
+        return dataStoreContextUtil;
+    }
+
+}