use of org.mybatis.generator.api.dom.DefaultJavaFormatter in project generator by mybatis.
the class GeneratedJavaFileTest method testGenericInterface.
@Test
public void testGenericInterface() {
FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType("org.mybatis.test.TestInterface");
fqjt.addTypeArgument(new FullyQualifiedJavaType("T"));
Interface ifc = new Interface(fqjt);
JavaFormatter jf = new DefaultJavaFormatter();
GeneratedJavaFile gjf = new GeneratedJavaFile(ifc, "src", jf);
assertEquals("TestInterface.java", gjf.getFileName());
assertEquals("org.mybatis.test", gjf.getTargetPackage());
}
use of org.mybatis.generator.api.dom.DefaultJavaFormatter in project generator by mybatis.
the class GeneratedJavaFileTest method testReqularInterface.
@Test
public void testReqularInterface() {
FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType("org.mybatis.test.TestInterface");
Interface ifc = new Interface(fqjt);
JavaFormatter jf = new DefaultJavaFormatter();
GeneratedJavaFile gjf = new GeneratedJavaFile(ifc, "src", jf);
assertEquals("TestInterface.java", gjf.getFileName());
assertEquals("org.mybatis.test", gjf.getTargetPackage());
}
Aggregations