summaryrefslogtreecommitdiffstats
path: root/appc-inbound/appc-design-services/provider
diff options
context:
space:
mode:
authorSudarshan Kumar <sudars19@in.ibm.com>2019-02-14 16:19:48 +0530
committerTakamune Cho <takamune.cho@att.com>2019-02-15 14:58:59 +0000
commitb65bc9ef16e0410b8f42b3fc0be4f6a297529dbc (patch)
tree49a3d38d33a50d021b552ea5123df33dc5559e75 /appc-inbound/appc-design-services/provider
parent888038258bef4d2284b56135895e6f4152978fea (diff)
Added Junit for DBException.java
Added Junit for DBException.java Issue-ID: APPC-1372 Change-Id: Ie5637f33c6a2bc6f51d51f0f94fb780699b3880c Signed-off-by: Sudarshan Kumar <sudars19@in.ibm.com>
Diffstat (limited to 'appc-inbound/appc-design-services/provider')
-rw-r--r--appc-inbound/appc-design-services/provider/src/test/java/org/onap/appc/design/dbervices/DBExceptionTest.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/appc-inbound/appc-design-services/provider/src/test/java/org/onap/appc/design/dbervices/DBExceptionTest.java b/appc-inbound/appc-design-services/provider/src/test/java/org/onap/appc/design/dbervices/DBExceptionTest.java
new file mode 100644
index 000000000..55b4ae79c
--- /dev/null
+++ b/appc-inbound/appc-design-services/provider/src/test/java/org/onap/appc/design/dbervices/DBExceptionTest.java
@@ -0,0 +1,40 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright 2019 IBM
+ *=================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.appc.design.dbervices;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class DBExceptionTest {
+
+ @Test
+ public void testDBException1() {
+ DBException dbException = new DBException("DBException");
+ Assert.assertEquals("DBException", dbException.getMessage());
+ }
+
+ @Test
+ public void testDBException2() {
+ DBException dbException = new DBException("DBException Occured", new Throwable("TestMsg"));
+ Assert.assertEquals("org.onap.appc.design.dbervices.DBException", dbException.getClass().getName());
+ Assert.assertEquals("TestMsg", dbException.getCause().getMessage());
+ }
+
+}