X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-widget-ms%2Fwidget-ms%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fportalapp%2Fwidget%2Fexception%2FStorageFileNotFoundExceptionTest.java;fp=ecomp-portal-widget-ms%2Fwidget-ms%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fportalapp%2Fwidget%2Fexception%2FStorageFileNotFoundExceptionTest.java;h=d49d87dcb3842ebab9034753b12d6adef896925c;hb=ade59c7b25862e84259ceb15941d1bf840a8c07c;hp=0000000000000000000000000000000000000000;hpb=ffd9af970318c1f5a0bad46d7aad5d4611414aae;p=portal.git diff --git a/ecomp-portal-widget-ms/widget-ms/src/test/java/org/onap/portalapp/widget/exception/StorageFileNotFoundExceptionTest.java b/ecomp-portal-widget-ms/widget-ms/src/test/java/org/onap/portalapp/widget/exception/StorageFileNotFoundExceptionTest.java new file mode 100644 index 00000000..d49d87dc --- /dev/null +++ b/ecomp-portal-widget-ms/widget-ms/src/test/java/org/onap/portalapp/widget/exception/StorageFileNotFoundExceptionTest.java @@ -0,0 +1,39 @@ +package org.onap.portalapp.widget.exception; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.onap.portalapp.widget.excetpion.StorageFileNotFoundException; + +public class StorageFileNotFoundExceptionTest { + + @Test + public void Test1() + { + String s1 = "Value1"; + String s2 = "value2"; + try { + if (!s1.equalsIgnoreCase(s2)) { + throw new StorageFileNotFoundException("org.onap.portalapp.widget.excetpion.StorageFileNotFoundException"); + } + } catch (StorageFileNotFoundException mde) { + assertEquals(mde.getMessage(),"org.onap.portalapp.widget.excetpion.StorageFileNotFoundException"); + } + } + + @Test + public void Test2() + { + String message = "Exception occured"; + String s1 = "Value1"; + String s2 = "value2"; + try { + if (!s1.equalsIgnoreCase(s2)) { + throw new StorageFileNotFoundException(message, new Throwable()); + } + } catch (StorageFileNotFoundException mde) { + assertEquals("org.onap.portalapp.widget.excetpion.StorageFileNotFoundException", mde.getClass().getName()); + } + } + +}