View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.context.notification;
8   
9   import org.mule.module.client.MuleClient;
10  
11  import static org.junit.Assert.assertNotNull;
12  
13  public class ExceptionNotificationTestCase extends AbstractNotificationTestCase
14  {
15  
16      @Override
17      protected String getConfigResources()
18      {
19          return "org/mule/test/integration/notifications/exception-notification-test.xml";
20      }
21  
22      @Override
23      public void doTest() throws Exception
24      {
25          MuleClient client = new MuleClient(muleContext);
26          assertNotNull(client.send("vm://in-1", "hello world", null));
27      }
28  
29      @Override
30      public RestrictedNode getSpecification()
31      {
32          return new Node(ExceptionNotification.class, ExceptionNotification.EXCEPTION_ACTION);
33      }
34  
35      @Override
36      public void validateSpecification(RestrictedNode spec) throws Exception
37      {
38          verifyAllNotifications(spec, ExceptionNotification.class,
39                  ExceptionNotification.EXCEPTION_ACTION, ExceptionNotification.EXCEPTION_ACTION);
40      }
41  
42  }