コード例 #1
0
 /** Scenario: a) Exception is thrown with error message and null exception */
 @Test
 public void testADPluginExceptionWithMessageAndNullCauseException() {
   String message = "some error message";
   ADPluginException exception = new ADPluginException(message, null);
   assertNotNull("Exception message is missing", exception.getMessage());
   assertEquals("Exception message is incorrect", exception.getMessage(), message);
   assertNull("Chained exception is missing", exception.getCause());
 }
コード例 #2
0
 /** Scenario: a) Exception is thrown with Null error message and null exception */
 @Test
 public void testADPluginExceptionWithNullMessageAndNullCauseException() {
   ADPluginException exception = new ADPluginException(null, null);
   assertNull("Exception message is missing", exception.getMessage());
   assertNull("Chained exception is missing", exception.getCause());
 }