Merge "DuplicateRecordException.java-junits"
[portal.git] / ecomp-portal-widget-ms / widget-ms / src / test / java / org / onap / portalapp / widget / exception / StorageFileNotFoundExceptionTest.java
1 package org.onap.portalapp.widget.exception;
2
3 import static org.junit.Assert.assertEquals;
4
5 import org.junit.Test;
6 import org.onap.portalapp.widget.excetpion.StorageFileNotFoundException;
7
8 public class StorageFileNotFoundExceptionTest {
9
10         @Test
11         public void Test1()
12         {
13                  String s1 = "Value1";
14                 String s2 = "value2";
15                 try {
16                     if (!s1.equalsIgnoreCase(s2)) {
17                         throw new StorageFileNotFoundException("org.onap.portalapp.widget.excetpion.StorageFileNotFoundException");
18                     }
19                 } catch (StorageFileNotFoundException mde) {
20                     assertEquals(mde.getMessage(),"org.onap.portalapp.widget.excetpion.StorageFileNotFoundException");
21                 }
22         }
23         
24         @Test
25         public void Test2()
26         {
27                  String message = "Exception occured";
28                  String s1 = "Value1";
29              String s2 = "value2";
30                 try {
31                     if (!s1.equalsIgnoreCase(s2)) {
32                         throw new StorageFileNotFoundException(message, new Throwable());
33                     }
34                 } catch (StorageFileNotFoundException mde) {
35                     assertEquals("org.onap.portalapp.widget.excetpion.StorageFileNotFoundException", mde.getClass().getName());
36                 }
37         }
38         
39 }