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.module.ibeans.annotations;
8   
9   import org.ibeans.impl.view.TextView;
10  import org.junit.Test;
11  
12  import static org.junit.Assert.assertNotNull;
13  import static org.junit.Assert.assertTrue;
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  }