summaryrefslogtreecommitdiffstats
path: root/appc-config/appc-config-adaptor/provider/src/test
diff options
context:
space:
mode:
authorSudarshan Kumar <sudars19@in.ibm.com>2019-02-04 16:06:38 +0530
committerPatrick Brady <patrick.brady@att.com>2019-02-05 18:08:47 +0000
commit688a1bd4f99cb856b067c7b38c02cdab27070865 (patch)
tree103cc1bd1a0fff2d1dc3651d4da24ee18de26c05 /appc-config/appc-config-adaptor/provider/src/test
parent33462c259f8c12388cc2804cc7ecf845f9a13bb0 (diff)
Junit test class added for TemplateException.java
Junit test class added for TemplateException.java Issue-ID: APPC-1372 Change-Id: I94d97e4b173c51a34a0320f3e24761582fc39101 Signed-off-by: Sudarshan Kumar <sudars19@in.ibm.com>
Diffstat (limited to 'appc-config/appc-config-adaptor/provider/src/test')
-rw-r--r--appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/TestTemplateException.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/TestTemplateException.java b/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/TestTemplateException.java
new file mode 100644
index 000000000..2fd25b233
--- /dev/null
+++ b/appc-config/appc-config-adaptor/provider/src/test/java/org/onap/appc/ccadaptor/TestTemplateException.java
@@ -0,0 +1,50 @@
+/*
+ * ============LICENSE_START==========================================
+ * org.onap.music
+ * ===================================================================
+ * Copyright (c) 2019 IBM Intellectual Property
+ * ===================================================================
+ * 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.ccadaptor;
+
+import static org.junit.Assert.assertSame;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class TestTemplateException {
+
+ String s1;
+ String s2;
+
+ @Before
+ public void setUp() {
+ s1 = "Value1";
+ s2 = "value2";
+ }
+
+ @Test
+ public void TestException1() {
+ try {
+ if (!s1.equalsIgnoreCase(s2)) {
+ throw new TemplateException("TemplateException");
+ }
+ } catch (TemplateException te) {
+ assertSame("TemplateException", te.getMessage());
+ }
+ }
+}