DuplicateRecordException.java-junits 42/99342/1
authorThugutla sailakshmi <tsaila10@in.ibm.com>
Mon, 9 Dec 2019 15:16:45 +0000 (20:46 +0530)
committerThugutla sailakshmi <tsaila10@in.ibm.com>
Mon, 9 Dec 2019 15:17:29 +0000 (20:47 +0530)
Issue-ID: PORTAL-797
Change-Id: Ic38819566a6197f37cb5c22ce71cc5767d454b25
Signed-off-by: Thugutla sailakshmi <tsaila10@in.ibm.com>
ecomp-portal-widget-ms/widget-ms/src/test/java/org/onap/portalapp/widget/exception/StorageFileNotFoundExceptionTest.java [new file with mode: 0644]

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 (file)
index 0000000..d49d87d
--- /dev/null
@@ -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());
+               }
+       }
+       
+}