View Javadoc

1   /*
2    * $Id: TextUsageViewTestCase.java 19026 2010-08-16 07:30:47Z 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  package org.mule.module.ibeans.annotations;
11  
12  import org.ibeans.impl.view.TextView;
13  import org.junit.Test;
14  
15  /**
16   * Basically, just test we don't get an error. Since the result is unstructured text it is hard to make many assertions
17   * on it
18   */
19  public class TextUsageViewTestCase extends AbstractIBeansTestCase
20  {
21      @Test
22      public void testUsageView() throws Exception
23      {
24          TextView view = new TextView();
25          String string = view.createView(TestUriIBean.class);
26  
27          assertNotNull(string);
28          System.out.println(string);
29  
30          assertTrue(string.contains("doSomething("));
31          assertTrue(string.contains("doSomethingElse("));
32          assertTrue(string.contains("doSomethingNoParams("));
33      }
34  }