renamed tests

This commit is contained in:
Timo Westkämper 2010-09-11 15:01:35 +00:00
parent 3ad42e1d3e
commit ceeacd9541
3 changed files with 15 additions and 3 deletions

View File

@ -39,11 +39,10 @@ public class AnnotationTest {
writer.annotation(getClass().getAnnotation(TestAnnotation3.class));
assertEquals("@com.mysema.codegen.TestAnnotation3(type=java.lang.annotation.ElementType.ANNOTATION_TYPE)", w.toString().trim());
}
@Test
public void MethodAnnotation() throws IOException, SecurityException, NoSuchMethodException {
writer.annotation(getClass().getMethod("testMethodAnnotation").getAnnotation(Test.class));
writer.annotation(getClass().getMethod("MethodAnnotation").getAnnotation(Test.class));
assertEquals("@org.junit.Test", w.toString().trim());
}

View File

@ -11,6 +11,7 @@ import java.io.IOException;
import java.io.StringWriter;
import java.lang.annotation.Annotation;
import java.util.Arrays;
import java.util.Collections;
import org.apache.commons.collections15.Transformer;
import org.apache.commons.io.IOUtils;
@ -56,6 +57,11 @@ public class JavaWriterTest {
testInterface2 = new SimpleType("com.mysema.codegen.TestInterface2","com.mysema.codegen","TestInterface2");
}
@Test
public void Primitive_Arrays(){
ClassType byteArray = new ClassType(byte[].class);
assertEquals("byte[]", writer.getRawName(byteArray));
}
@Test
public void Basic() throws IOException {

View File

@ -8,6 +8,7 @@ package com.mysema.codegen.model;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import java.util.Collections;
import java.util.Map;
import org.junit.Test;
@ -37,4 +38,10 @@ public class ClassTypeTest {
assertFalse(mapType.isPrimitive());
}
@Test
public void Primitive_Arrays(){
ClassType byteArray = new ClassType(byte[].class);
assertEquals("byte[]", byteArray.getRawName(Collections.singleton("java.lang"), Collections.<String>emptySet()));
}
}