View Javadoc

1   /*
2    * $Id: RejectOldConfigTestCase.java 19191 2010-08-25 21:05:23Z tcarlson $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.config.spring;
12  
13  import org.mule.api.MuleContext;
14  import org.mule.tck.FunctionalTestCase;
15  
16  public class RejectOldConfigTestCase extends FunctionalTestCase
17  {
18  
19      protected String getConfigResources()
20      {
21          return "old-config.xml";
22      }
23  
24      public void testParse()
25      {
26          // see overloaded methods
27      }
28  
29      protected MuleContext createMuleContext() throws Exception
30      {
31          try {
32              super.createMuleContext();
33              fail("Context created with no problems - expected failure");
34          }
35          catch (Exception e)
36          {
37              String msg = e.getMessage();
38              assertTrue(msg, msg.indexOf("Unable to locate NamespaceHandler for namespace [null]") > -1);
39          }
40          return null;
41      }
42  
43  }