View Javadoc

1   /*
2    * $Id: BadTransformationContentTypeTestCase.java 22414 2011-07-14 13:24:46Z dirk.olmes $
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.transformers.simple;
12  
13  import org.mule.tck.junit4.FunctionalTestCase;
14  
15  import org.junit.Test;
16  import org.springframework.beans.factory.BeanCreationException;
17  
18  public class BadTransformationContentTypeTestCase extends FunctionalTestCase
19  {
20  
21      public BadTransformationContentTypeTestCase()
22      {
23          setStartContext(false);
24      }
25  
26      @Override
27      protected String getConfigResources()
28      {
29          return "bad-content-type-setting-transformer-configs.xml";
30      }
31  
32      @Test(expected = BeanCreationException.class)
33      public void testReturnType() throws Exception
34      {
35          muleContext.start();
36          muleContext.getRegistry().lookupTransformer("testTransformer");
37      }
38  }