summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorraine Welch <lb2391@att.com>2019-12-20 19:06:00 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-20 19:06:00 +0000
commit77a366936ae22566d25b9f6af8492bd7293b50f1 (patch)
tree97833ded59788b27752f464ed4d0db631549acfc
parent8bdd277a883f19bd917d8fce860eaf6c78bc85f6 (diff)
parentade59c7b25862e84259ceb15941d1bf840a8c07c (diff)
Merge "DuplicateRecordException.java-junits"
-rw-r--r--ecomp-portal-widget-ms/widget-ms/src/test/java/org/onap/portalapp/widget/exception/StorageFileNotFoundExceptionTest.java39
1 files changed, 39 insertions, 0 deletions
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());
+ }
+ }
+
+}