Package net.riccardocossu.autodoc.jpa

Examples of net.riccardocossu.autodoc.jpa.JPAPlugin


public class ClassParserTest {

  @Test
  public void testSimple() {
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new JPAPlugin());
    ClassParser parser = new ClassParser();
    AnnotatedClass res = parser.parse(AnnotatedTestEntity.class, factory);
    assertNotNull(res);
    assertEquals(1, res.getAnnotations().size());
    assertEquals(1, res.getFields().size());
View Full Code Here


  }

  @Test
  public void testEmbedded() {
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new JPAPlugin());
    ClassParser parser = new ClassParser();
    AnnotatedClass res = parser.parse(EntityWithEmbeddable.class, factory);
    assertNotNull(res);
    assertEquals(2, res.getAnnotations().size());
    assertEquals(1, res.getFields().size());
View Full Code Here

  }

  @Test
  public void testNonJpa() {
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new JPAPlugin());
    ClassParser parser = new ClassParser();
    AnnotatedClass res = parser.parse(NonJPATestEntity.class, factory);
    assertNull(res);
  }
View Full Code Here

  @Test
  public void testOutput() {
    PackageParser parser = new PackageParser();
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new JPAPlugin());
    PackageContainer pack = parser.parse(
        "net.riccardocossu.autodoc.test.model", factory);
    List<PackageContainer> packages = new ArrayList<PackageContainer>();
    packages.add(pack);
    HtmlOutputPlugin outPlugin = new HtmlOutputPlugin();
View Full Code Here

  @Test
  public void testJPAPlugin() {
    PackageParser parser = new PackageParser();
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new JPAPlugin());
    PackageContainer pack = parser.parse(
        "net.riccardocossu.autodoc.test.model", factory);
    assertEquals(6, pack.getClasses().size());
  }
View Full Code Here

  @Test
  public void testSimplestAndJPAPlugin() {
    PackageParser parser = new PackageParser();
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new TestSimplestPlugin());
    factory.registerPlugin(new JPAPlugin());
    PackageContainer pack = parser.parse(
        "net.riccardocossu.autodoc.test.model", factory);
    assertEquals(7, pack.getClasses().size());
  }
View Full Code Here

TOP

Related Classes of net.riccardocossu.autodoc.jpa.JPAPlugin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.