View Javadoc

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