From: Peter Nosal Date: Wed, 27 Jul 2016 07:39:42 +0000 (+0200) Subject: Bug 5947: added tests for mdsal-binding-api X-Git-Tag: release/boron~30 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=mdsal.git;a=commitdiff_plain;h=29466fb37f40cf8f633a19a6ce0c4d0c07c5af7e Bug 5947: added tests for mdsal-binding-api Change-Id: Id6f0434eac4982ae91136fe5e2a04d40443df9a0 Signed-off-by: Peter Nosal --- 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 index 0000000000..3c6773e954 --- /dev/null +++ b/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataObjectModificationTest.java @@ -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 index 0000000000..c40c755feb --- /dev/null +++ b/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeListeningExceptionTest.java @@ -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 index 0000000000..56e35d859b --- /dev/null +++ b/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeLoopExceptionTest.java @@ -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 index 0000000000..cf52e609e1 --- /dev/null +++ b/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeProducerBusyExceptionTest.java @@ -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 index 0000000000..05b500a928 --- /dev/null +++ b/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/DataTreeProducerExceptionTest.java @@ -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 index 0000000000..022510a931 --- /dev/null +++ b/binding/mdsal-binding-api/src/test/java/org/opendaylight/mdsal/binding/api/NotificationRejectedExceptionTest.java @@ -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