From: Sudarshan Kumar Date: Mon, 4 Feb 2019 10:36:38 +0000 (+0530) Subject: Junit test class added for TemplateException.java X-Git-Tag: 1.5.0~299 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=688a1bd4f99cb856b067c7b38c02cdab27070865;p=appc.git 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 --- 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()); + } + } +}