Bug 5947: added tests for mdsal-binding-api 06/42606/2
authorPeter Nosal <peter.nosal@pantheon.tech>
Wed, 27 Jul 2016 07:39:42 +0000 (09:39 +0200)
committerRobert Varga <nite@hq.sk>
Fri, 29 Jul 2016 12:59:31 +0000 (12:59 +0000)
Change-Id: Id6f0434eac4982ae91136fe5e2a04d40443df9a0
Signed-off-by: Peter Nosal <peter.nosal@pantheon.tech>
binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataObjectModificationTest.java [new file with mode: 0644]
binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeListeningExceptionTest.java [new file with mode: 0644]
binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeLoopExceptionTest.java [new file with mode: 0644]
binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeProducerBusyExceptionTest.java [new file with mode: 0644]
binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeProducerExceptionTest.java [new file with mode: 0644]
binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/NotificationRejectedExceptionTest.java [new file with mode: 0644]

diff --git a/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataObjectModificationTest.java b/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataObjectModificationTest.java
new file mode 100644 (file)
index 0000000..3c6773e
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. 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.mdsal.binding.api;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+public class DataObjectModificationTest {
+
+    @Test
+    public void notificationMethodEnumTest() throws Exception {
+        assertNotNull(DataObjectModification.ModificationType.values());
+    }
+}
\ No newline at end of file
diff --git a/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeListeningExceptionTest.java b/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeListeningExceptionTest.java
new file mode 100644 (file)
index 0000000..c40c755
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. 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.mdsal.binding.api;
+
+import org.junit.Test;
+
+public class DataTreeListeningExceptionTest {
+
+    @Test(expected = DataTreeListeningException.class)
+    public void constructWithCauseTest() throws Exception {
+        throw new DataTreeListeningException("test", new Throwable());
+    }
+
+    @Test(expected = DataTreeListeningException.class)
+    public void constructTest() throws Exception {
+        throw new DataTreeListeningException("test");
+    }
+}
\ No newline at end of file
diff --git a/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeLoopExceptionTest.java b/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeLoopExceptionTest.java
new file mode 100644 (file)
index 0000000..56e35d8
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. 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.mdsal.binding.api;
+
+import org.junit.Test;
+
+public class DataTreeLoopExceptionTest {
+
+    @Test(expected = DataTreeLoopException.class)
+    public void constructWithCauseTest() throws Exception {
+        throw new DataTreeLoopException("test", new Throwable());
+    }
+
+    @Test(expected = DataTreeLoopException.class)
+    public void constructTest() throws Exception {
+        throw new DataTreeLoopException("test");
+    }
+}
\ No newline at end of file
diff --git a/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeProducerBusyExceptionTest.java b/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeProducerBusyExceptionTest.java
new file mode 100644 (file)
index 0000000..cf52e60
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. 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.mdsal.binding.api;
+
+import org.junit.Test;
+
+public class DataTreeProducerBusyExceptionTest {
+
+    @Test(expected = DataTreeProducerBusyException.class)
+    public void constructWithCauseTest() throws Exception {
+        throw new DataTreeProducerBusyException("test", new Throwable());
+    }
+
+    @Test(expected = DataTreeProducerBusyException.class)
+    public void constructTest() throws Exception {
+        throw new DataTreeProducerBusyException("test");
+    }
+}
\ No newline at end of file
diff --git a/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeProducerExceptionTest.java b/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeProducerExceptionTest.java
new file mode 100644 (file)
index 0000000..05b500a
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. 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.mdsal.binding.api;
+
+import org.junit.Test;
+
+public class DataTreeProducerExceptionTest {
+
+    @Test(expected = DataTreeProducerException.class)
+    public void constructWithCauseTest() throws Exception {
+        throw new DataTreeProducerException("test", new Throwable());
+    }
+
+    @Test(expected = DataTreeProducerException.class)
+    public void constructTest() throws Exception {
+        throw new DataTreeProducerException("test");
+    }
+}
\ No newline at end of file
diff --git a/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/NotificationRejectedExceptionTest.java b/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/NotificationRejectedExceptionTest.java
new file mode 100644 (file)
index 0000000..022510a
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. 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.mdsal.binding.api;
+
+import org.junit.Test;
+
+public class NotificationRejectedExceptionTest {
+
+    @Test(expected = NotificationRejectedException.class)
+    public void constructWithCauseTest() throws Exception {
+        throw new NotificationRejectedException("test", new Throwable());
+    }
+
+    @Test(expected = NotificationRejectedException.class)
+    public void constructTest() throws Exception {
+        throw new NotificationRejectedException("test");
+    }
+}
\ No newline at end of file