******************************************************************************/\r
package org.onap.aaf.cadi;\r
\r
+import static org.junit.Assert.*;\r
+\r
+import org.junit.Test;\r
+\r
import static org.hamcrest.CoreMatchers.is;\r
import static org.junit.Assert.*;\r
\r
assertThat(exception.getMessage(), is("New Exception"));\r
\r
}\r
+ \r
+ @Test\r
+ public void testCadiException1() {\r
+ CadiException exception = new CadiException();\r
+ \r
+ assertNotNull(exception);\r
+ }\r
+\r
+ @Test\r
+ public void testCadiExceptionString1() {\r
+ CadiException exception = new CadiException("New Exception");\r
+ assertNotNull(exception);\r
+ assertThat(exception.getMessage(), is("New Exception"));\r
+ }\r
+\r
+ @Test\r
+ public void testCadiExceptionThrowable1() {\r
+ CadiException exception = new CadiException(new Throwable("New Exception"));\r
+ assertNotNull(exception);\r
+ assertThat(exception.getMessage(), is("java.lang.Throwable: New Exception"));\r
+ }\r
+\r
+ @Test\r
+ public void testCadiExceptionStringThrowable1() {\r
+ CadiException exception = new CadiException("New Exception",new Throwable("New Exception"));\r
+ assertNotNull(exception);\r
+ assertThat(exception.getMessage(), is("New Exception"));\r
+\r
+ }\r
+ \r
+ @Test\r
+ public void testCadiException2() {\r
+ CadiException exception = new CadiException();\r
+ \r
+ assertNotNull(exception);\r
+ }\r
+\r
+ @Test\r
+ public void testCadiExceptionString2() {\r
+ CadiException exception = new CadiException("New Exception");\r
+ assertNotNull(exception);\r
+ assertThat(exception.getMessage(), is("New Exception"));\r
+ }\r
+\r
+ @Test\r
+ public void testCadiExceptionThrowable2() {\r
+ CadiException exception = new CadiException(new Throwable("New Exception"));\r
+ assertNotNull(exception);\r
+ assertThat(exception.getMessage(), is("java.lang.Throwable: New Exception"));\r
+ }\r
+\r
+ @Test\r
+ public void testCadiExceptionStringThrowable2() {\r
+ CadiException exception = new CadiException("New Exception",new Throwable("New Exception"));\r
+ assertNotNull(exception);\r
+ assertThat(exception.getMessage(), is("New Exception"));\r
+\r
+ }\r
+\r
+\r
\r
}\r