blob: d49d87dcb3842ebab9034753b12d6adef896925c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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());
}
}
}
|