Debian Codegraph @

jax-maven-plugin-test/src/test/java/com/github/davidmoten/xjc/XjcPluginTest.java

raw symbols SCIP
1 package com.github.davidmoten.xjc;
2
3 import static org.junit.Assert.assertNotNull;
4
5 import org.junit.Ignore;
6 import org.junit.Test;
7
8 import dummy.ObjectFactory;
9 import dummy.Param;
10 import dummy.Record;
11
12 public class XjcPluginTest {
13
14 @Test
15 public void testClassesGeneratedFromDtd() {
16 System.out.println("Found generated class " + ObjectFactory.class.getName());
17 System.out.println("Found generated class " + Param.class.getName());
18 System.out.println("Found generated class " + Record.class.getName());
19 }
20
21 @Test
22 @Ignore // not supported for jakarta because jaxb2-basics (jaxb plugins) doesn't support jakarta yet
23 public void testJaxb2PluginGeneratedCodePresent() {
24 // assertNotNull(getDeclaredMethod(plugin.support.Param.class, "toString"));
25 // assertNotNull(getDeclaredMethod(plugin.support.Param.class, "equals"));
26 // assertNotNull(getDeclaredMethod(plugin.support.Param.class, "hashCode"));
27 // System.out.println("Jaxb2-basics plugins worked correctly");
28 }
29
30 @Test
31 public void testKmlEpisodeFileGenerated() {
32 assertNotNull(XjcPluginTest.class.getClassLoader().getResourceAsStream("kml.episode"));
33 System.out.println("episode file generated correctly");
34 }
35
36 // private Method getDeclaredMethod(Class<?> clazz, String methodName)
37 // {
38 // for (Method method : clazz.getDeclaredMethods()) {
39 // if(method.getName().equals(methodName)) {
40 // return method;
41 // }
42 // }
43 //
44 // throw new RuntimeException(new NoSuchMethodException(methodName));
45 // }
46 }