added tests

This commit is contained in:
Timo Westkämper 2011-03-09 13:51:58 +00:00
parent 021fbef4e5
commit adc5d95972
2 changed files with 20 additions and 0 deletions

View File

@ -132,6 +132,14 @@ public class JavaWriterTest {
match("/testInterface2", w.toString());
}
@Test
public void Interface3() throws IOException{
writer.beginInterface(testType, testType2, testInterface1, testInterface2);
writer.end();
assertTrue(w.toString().contains("public interface JavaWriterTest extends Test, TestInterface1, TestInterface2 {"));
}
@Test
public void Javadoc() throws IOException{
writer.packageDecl("com.mysema.codegen");
@ -294,6 +302,13 @@ public class JavaWriterTest {
match("/testImports2", w.toString());
}
@Test
public void Imports3() throws IOException{
writer.importClasses("java.util.Locale");
assertTrue(w.toString().contains("import java.util.Locale;"));
}
@Test
public void SuppressWarnings() throws IOException{

View File

@ -52,6 +52,11 @@ public class ClassTypeTest {
assertFalse(mapType.isPrimitive());
}
@Test
public void GetComponentType(){
assertEquals("java.lang.String", new ClassType(String[].class).getComponentType().getFullName());
}
@Test
public void Primitive_Arrays(){
ClassType byteArray = new ClassType(byte[].class);