From 3ad42e1d3ea5dc50271b42a97382bc5011a8d6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Westk=C3=A4mper?= Date: Sat, 11 Sep 2010 13:57:04 +0000 Subject: [PATCH] renamed tests --- .../com/mysema/codegen/AnnotationTest.java | 14 ++++---- .../mysema/codegen/ComplexEvaluationTest.java | 2 +- .../mysema/codegen/EvaluatorFactoryTest.java | 8 ++--- .../com/mysema/codegen/JavaWriterTest.java | 28 +++++++-------- .../codegen/MemSourceFileObjectTest.java | 6 ++-- .../com/mysema/codegen/ScalaWriterTest.java | 22 ++++++------ .../mysema/codegen/SimpleCompilerTest.java | 2 +- .../mysema/codegen/model/ClassTypeTest.java | 2 +- .../mysema/codegen/model/ConstructorTest.java | 2 +- .../codegen/model/TypeCategoryTest.java | 2 +- .../com/mysema/codegen/model/TypeTest.java | 34 +++++++++---------- .../codegen/support/ClassUtilsTest.java | 4 +-- 12 files changed, 63 insertions(+), 63 deletions(-) diff --git a/src/test/java/com/mysema/codegen/AnnotationTest.java b/src/test/java/com/mysema/codegen/AnnotationTest.java index 018560e04..7c367e8c7 100644 --- a/src/test/java/com/mysema/codegen/AnnotationTest.java +++ b/src/test/java/com/mysema/codegen/AnnotationTest.java @@ -23,44 +23,44 @@ public class AnnotationTest { private CodeWriter writer = new JavaWriter(w); @Test - public void testClassAnnotation() throws IOException{ + public void ClassAnnotation() throws IOException{ writer.annotation(getClass().getAnnotation(TestAnnotation.class)); assertEquals("@com.mysema.codegen.TestAnnotation(clazz=com.mysema.codegen.AnnotationTest.class, prop2=false)", w.toString().trim()); } @Test - public void testClassAnnotation2() throws IOException{ + public void ClassAnnotation2() throws IOException{ writer.annotation(getClass().getAnnotation(TestAnnotation2.class)); assertEquals("@com.mysema.codegen.TestAnnotation2(\"Hello\")", w.toString().trim()); } @Test - public void testClassAnnotation3() throws IOException{ + public void ClassAnnotation3() throws IOException{ writer.annotation(getClass().getAnnotation(TestAnnotation3.class)); assertEquals("@com.mysema.codegen.TestAnnotation3(type=java.lang.annotation.ElementType.ANNOTATION_TYPE)", w.toString().trim()); } @Test - public void testMethodAnnotation() throws IOException, SecurityException, NoSuchMethodException { + public void MethodAnnotation() throws IOException, SecurityException, NoSuchMethodException { writer.annotation(getClass().getMethod("testMethodAnnotation").getAnnotation(Test.class)); assertEquals("@org.junit.Test", w.toString().trim()); } @Test - public void testMin() throws IOException{ + public void Min() throws IOException{ writer.annotation(new MinImpl(10)); assertEquals("@javax.validation.constraints.Min(value=10)", w.toString().trim()); } @Test - public void testMax() throws IOException{ + public void Max() throws IOException{ writer.annotation(new MaxImpl(10)); assertEquals("@javax.validation.constraints.Max(value=10)", w.toString().trim()); } @Test - public void testNotNull() throws IOException{ + public void NotNull() throws IOException{ writer.annotation(new NotNullImpl()); assertEquals("@javax.validation.constraints.NotNull", w.toString().trim()); } diff --git a/src/test/java/com/mysema/codegen/ComplexEvaluationTest.java b/src/test/java/com/mysema/codegen/ComplexEvaluationTest.java index a112cd31d..1f59568b1 100644 --- a/src/test/java/com/mysema/codegen/ComplexEvaluationTest.java +++ b/src/test/java/com/mysema/codegen/ComplexEvaluationTest.java @@ -26,7 +26,7 @@ public class ComplexEvaluationTest { @Test @SuppressWarnings("unchecked") - public void testComplex(){ + public void Complex(){ ClassType resultType = new ClassType(TypeCategory.LIST,List.class, Types.STRING); StringBuilder source = new StringBuilder(); source.append("java.util.List rv = new java.util.ArrayList();\n"); diff --git a/src/test/java/com/mysema/codegen/EvaluatorFactoryTest.java b/src/test/java/com/mysema/codegen/EvaluatorFactoryTest.java index 2d0970251..43ba1d939 100644 --- a/src/test/java/com/mysema/codegen/EvaluatorFactoryTest.java +++ b/src/test/java/com/mysema/codegen/EvaluatorFactoryTest.java @@ -52,7 +52,7 @@ public class EvaluatorFactoryTest { } @Test - public void testSimple(){ + public void Simple(){ for (String expr : Arrays.asList("a.equals(b)", "a.startsWith(b)", "a.equalsIgnoreCase(b)")){ long start = System.currentTimeMillis(); evaluate(expr, boolean.class, names, strings, Arrays.asList("a","b"), Collections.emptyMap()); @@ -69,7 +69,7 @@ public class EvaluatorFactoryTest { } @Test - public void testResults(){ + public void Results(){ // String + String test("a + b", String.class, names, strings, Arrays.asList("Hello ", "World"), "Hello World"); @@ -81,7 +81,7 @@ public class EvaluatorFactoryTest { } @Test - public void testWithConstants(){ + public void WithConstants(){ Map constants = new HashMap(); constants.put("x", "Hello World"); List> types = Arrays.>asList(String.class); @@ -91,7 +91,7 @@ public class EvaluatorFactoryTest { } @Test - public void testCustomType(){ + public void CustomType(){ test("a.getName()", String.class, Collections.singletonList("a"), Collections.>singletonList(TestEntity.class), Arrays.asList(new TestEntity("Hello World")), "Hello World"); diff --git a/src/test/java/com/mysema/codegen/JavaWriterTest.java b/src/test/java/com/mysema/codegen/JavaWriterTest.java index d24f659d7..4aaec8ead 100644 --- a/src/test/java/com/mysema/codegen/JavaWriterTest.java +++ b/src/test/java/com/mysema/codegen/JavaWriterTest.java @@ -58,7 +58,7 @@ public class JavaWriterTest { @Test - public void testBasic() throws IOException { + public void Basic() throws IOException { writer.packageDecl("com.mysema.codegen"); writer.imports(IOException.class, StringWriter.class, Test.class); writer.beginClass(testType); @@ -72,7 +72,7 @@ public class JavaWriterTest { } @Test - public void testExtends() throws IOException{ + public void Extends() throws IOException{ writer.beginClass(testType2, testSuperType); writer.end(); @@ -80,7 +80,7 @@ public class JavaWriterTest { } @Test - public void testImplements() throws IOException{ + public void Implements() throws IOException{ writer.beginClass(testType2, null, testInterface1,testInterface2); writer.end(); @@ -88,7 +88,7 @@ public class JavaWriterTest { } @Test - public void testInterface() throws IOException{ + public void Interface() throws IOException{ writer.packageDecl("com.mysema.codegen"); writer.imports(IOException.class, StringWriter.class, Test.class); writer.beginInterface(testType); @@ -98,7 +98,7 @@ public class JavaWriterTest { } @Test - public void testInterface2() throws IOException{ + public void Interface2() throws IOException{ writer.beginInterface(testType2, testInterface1); writer.end(); @@ -106,7 +106,7 @@ public class JavaWriterTest { } @Test - public void testJavadoc() throws IOException{ + public void Javadoc() throws IOException{ writer.packageDecl("com.mysema.codegen"); writer.imports(IOException.class, StringWriter.class, Test.class); writer.javadoc("JavaWriterTest is a test class"); @@ -118,7 +118,7 @@ public class JavaWriterTest { @Test - public void testAnnotations() throws IOException{ + public void Annotations() throws IOException{ writer.packageDecl("com.mysema.codegen"); writer.imports(IOException.class, StringWriter.class); writer.annotation(Entity.class); @@ -132,7 +132,7 @@ public class JavaWriterTest { } @Test - public void testAnnotations2() throws IOException{ + public void Annotations2() throws IOException{ writer.packageDecl("com.mysema.codegen"); writer.imports(IOException.class.getPackage(), StringWriter.class.getPackage()); writer.annotation(Entity.class); @@ -160,7 +160,7 @@ public class JavaWriterTest { } @Test - public void testFields() throws IOException{ + public void Fields() throws IOException{ writer.beginClass(testType); // private writer.privateField(Types.STRING, "privateField"); @@ -181,7 +181,7 @@ public class JavaWriterTest { } @Test - public void testMethods() throws IOException{ + public void Methods() throws IOException{ writer.beginClass(testType); // private @@ -204,7 +204,7 @@ public class JavaWriterTest { } @Test - public void testConstructors() throws IOException{ + public void Constructors() throws IOException{ writer.beginClass(testType); writer.beginConstructor(Arrays.asList(new Parameter("a", Types.STRING), new Parameter("b", Types.STRING)), transformer); @@ -220,7 +220,7 @@ public class JavaWriterTest { } @Test - public void testImports() throws IOException{ + public void Imports() throws IOException{ writer.staticimports(Arrays.class); match("/testImports", w.toString()); @@ -228,7 +228,7 @@ public class JavaWriterTest { @Test - public void testImports2() throws IOException{ + public void Imports2() throws IOException{ writer.importPackages("java.lang.reflect","java.util"); match("/testImports2", w.toString()); @@ -236,7 +236,7 @@ public class JavaWriterTest { @Test - public void testSuppressWarnings() throws IOException{ + public void SuppressWarnings() throws IOException{ writer.suppressWarnings("unused"); writer.privateField(Types.STRING, "test"); diff --git a/src/test/java/com/mysema/codegen/MemSourceFileObjectTest.java b/src/test/java/com/mysema/codegen/MemSourceFileObjectTest.java index cf8ee8358..b06807e23 100644 --- a/src/test/java/com/mysema/codegen/MemSourceFileObjectTest.java +++ b/src/test/java/com/mysema/codegen/MemSourceFileObjectTest.java @@ -14,20 +14,20 @@ import org.junit.Test; public class MemSourceFileObjectTest { @Test - public void test(){ + public void Simple(){ MemSourceFileObject obj = new MemSourceFileObject("Test", "Hello World"); assertEquals("Hello World", obj.getCharContent(true).toString()); } @Test - public void testOpenWriter() throws IOException { + public void OpenWriter() throws IOException { MemSourceFileObject obj = new MemSourceFileObject("Test"); obj.openWriter().write("Hello World"); assertEquals("Hello World", obj.getCharContent(true).toString()); } @Test - public void testOpenWriter2() throws IOException { + public void OpenWriter2() throws IOException { MemSourceFileObject obj = new MemSourceFileObject("Test"); obj.openWriter().append("Hello World"); assertEquals("Hello World", obj.getCharContent(true).toString()); diff --git a/src/test/java/com/mysema/codegen/ScalaWriterTest.java b/src/test/java/com/mysema/codegen/ScalaWriterTest.java index 0bcd3d7b4..9625a0d0a 100644 --- a/src/test/java/com/mysema/codegen/ScalaWriterTest.java +++ b/src/test/java/com/mysema/codegen/ScalaWriterTest.java @@ -96,7 +96,7 @@ public class ScalaWriterTest { } @Test - public void testBasic() throws IOException { + public void Basic() throws IOException { writer.packageDecl("com.mysema.codegen"); writer.imports(IOException.class, StringWriter.class, Test.class); writer.beginClass(testType); @@ -110,7 +110,7 @@ public class ScalaWriterTest { } @Test - public void testExtends() throws IOException{ + public void Extends() throws IOException{ writer.beginClass(testType2, testSuperType); writer.end(); @@ -118,7 +118,7 @@ public class ScalaWriterTest { } @Test - public void testImplements() throws IOException{ + public void Implements() throws IOException{ writer.beginClass(testType2, null, testInterface1,testInterface2); writer.end(); @@ -126,7 +126,7 @@ public class ScalaWriterTest { } @Test - public void testInterface() throws IOException{ + public void Interface() throws IOException{ writer.packageDecl("com.mysema.codegen"); writer.imports(IOException.class, StringWriter.class, Test.class); writer.beginInterface(testType); @@ -136,7 +136,7 @@ public class ScalaWriterTest { } @Test - public void testInterface2() throws IOException{ + public void Interface2() throws IOException{ writer.beginInterface(testType2, testInterface1); writer.end(); @@ -144,7 +144,7 @@ public class ScalaWriterTest { } @Test - public void testJavadoc() throws IOException{ + public void Javadoc() throws IOException{ writer.packageDecl("com.mysema.codegen"); writer.imports(IOException.class, StringWriter.class, Test.class); writer.javadoc("JavaWriterTest is a test class"); @@ -156,7 +156,7 @@ public class ScalaWriterTest { @Test - public void testAnnotations() throws IOException{ + public void Annotations() throws IOException{ writer.packageDecl("com.mysema.codegen"); writer.imports(IOException.class, StringWriter.class); writer.annotation(Entity.class); @@ -170,7 +170,7 @@ public class ScalaWriterTest { } @Test - public void testAnnotations2() throws IOException{ + public void Annotations2() throws IOException{ writer.packageDecl("com.mysema.codegen"); writer.imports(IOException.class.getPackage(), StringWriter.class.getPackage()); writer.annotation(Entity.class); @@ -198,7 +198,7 @@ public class ScalaWriterTest { } @Test - public void testFields() throws IOException{ + public void Fields() throws IOException{ writer.beginClass(testType); // private writer.privateField(Types.STRING, "privateField"); @@ -219,7 +219,7 @@ public class ScalaWriterTest { } @Test - public void testMethods() throws IOException{ + public void Methods() throws IOException{ writer.beginClass(testType); // private @@ -242,7 +242,7 @@ public class ScalaWriterTest { } @Test - public void testConstructors() throws IOException{ + public void Constructors() throws IOException{ writer.beginClass(testType); writer.beginConstructor(Arrays.asList(new Parameter("a", Types.STRING), new Parameter("b", Types.STRING)), transformer); diff --git a/src/test/java/com/mysema/codegen/SimpleCompilerTest.java b/src/test/java/com/mysema/codegen/SimpleCompilerTest.java index 7b223ffd2..2c65178eb 100644 --- a/src/test/java/com/mysema/codegen/SimpleCompilerTest.java +++ b/src/test/java/com/mysema/codegen/SimpleCompilerTest.java @@ -24,7 +24,7 @@ public class SimpleCompilerTest { } @Test - public void testRun() { + public void Run() { new File("target/out").mkdir(); JavaCompiler compiler = new SimpleCompiler(); System.out.println(compiler.getClass().getName()); diff --git a/src/test/java/com/mysema/codegen/model/ClassTypeTest.java b/src/test/java/com/mysema/codegen/model/ClassTypeTest.java index 09743d286..d5487009d 100644 --- a/src/test/java/com/mysema/codegen/model/ClassTypeTest.java +++ b/src/test/java/com/mysema/codegen/model/ClassTypeTest.java @@ -23,7 +23,7 @@ public class ClassTypeTest { // } @Test - public void as(){ + public void As(){ assertEquals(TypeCategory.COMPARABLE, stringType.as(TypeCategory.COMPARABLE).getCategory()); } diff --git a/src/test/java/com/mysema/codegen/model/ConstructorTest.java b/src/test/java/com/mysema/codegen/model/ConstructorTest.java index c36aef19b..307028323 100644 --- a/src/test/java/com/mysema/codegen/model/ConstructorTest.java +++ b/src/test/java/com/mysema/codegen/model/ConstructorTest.java @@ -20,7 +20,7 @@ public class ConstructorTest { @Test public void test(){ - Parameter firstName = new Parameter("firstName", new ClassType(TypeCategory.STRING, String.class)); + Parameter firstName = new Parameter("firstName", new ClassType(TypeCategory.STRING, String.class)); Parameter lastName = new Parameter("lastName", new ClassType(TypeCategory.STRING, String.class)); Constructor c1 = new Constructor(Arrays.asList(firstName, lastName)); Constructor c2 = new Constructor(Arrays.asList(firstName, lastName)); diff --git a/src/test/java/com/mysema/codegen/model/TypeCategoryTest.java b/src/test/java/com/mysema/codegen/model/TypeCategoryTest.java index 13e1f8e43..90f719b1c 100644 --- a/src/test/java/com/mysema/codegen/model/TypeCategoryTest.java +++ b/src/test/java/com/mysema/codegen/model/TypeCategoryTest.java @@ -13,7 +13,7 @@ import org.junit.Test; public class TypeCategoryTest { @Test - public void testIsSubCategoryOf() { + public void IsSubCategoryOf() { assertTrue(TypeCategory.BOOLEAN.isSubCategoryOf(TypeCategory.COMPARABLE)); assertTrue(TypeCategory.STRING.isSubCategoryOf(TypeCategory.COMPARABLE)); assertTrue(TypeCategory.NUMERIC.isSubCategoryOf(TypeCategory.COMPARABLE)); diff --git a/src/test/java/com/mysema/codegen/model/TypeTest.java b/src/test/java/com/mysema/codegen/model/TypeTest.java index 35d8aed79..bf296ba95 100644 --- a/src/test/java/com/mysema/codegen/model/TypeTest.java +++ b/src/test/java/com/mysema/codegen/model/TypeTest.java @@ -46,7 +46,7 @@ public class TypeTest { } @Test - public void testEquals(){ + public void Equals(){ assertEquals(locale, locale2); assertEquals(locale2, locale); assertEquals(stringList, stringList2); @@ -54,13 +54,13 @@ public class TypeTest { } @Test - public void testHashcode(){ + public void Hashcode(){ assertEquals(locale.hashCode(), locale2.hashCode()); assertEquals(stringList.hashCode(), stringList2.hashCode()); } @Test - public void testGetGenericNameBoolean() { + public void GetGenericNameBoolean() { assertEquals("java.util.Locale",locale.getGenericName(true)); assertEquals("java.util.Locale",locale2.getGenericName(true)); assertEquals("java.util.List",stringList.getGenericName(true)); @@ -73,7 +73,7 @@ public class TypeTest { } @Test - public void testGetRawName() { + public void GetRawName() { assertEquals("java.util.Locale",locale.getRawName(packages, classes)); assertEquals("java.util.Locale",locale2.getRawName(packages, classes)); assertEquals("java.util.List",stringList.getRawName(packages, classes)); @@ -84,7 +84,7 @@ public class TypeTest { } @Test - public void testGetGenericNameBooleanSetOfStringSetOfString() { + public void GetGenericNameBooleanSetOfStringSetOfString() { assertEquals("java.util.Locale",locale.getGenericName(true, packages, classes)); assertEquals("java.util.Locale",locale2.getGenericName(true, packages, classes)); assertEquals("java.util.List",stringList.getGenericName(true,packages, classes)); @@ -92,7 +92,7 @@ public class TypeTest { } @Test - public void testGetFullName() { + public void GetFullName() { assertEquals("java.util.Locale",locale.getFullName()); assertEquals("java.util.Locale",locale2.getFullName()); assertEquals("java.util.List",stringList.getFullName()); @@ -100,7 +100,7 @@ public class TypeTest { } @Test - public void testGetPackageName() { + public void GetPackageName() { assertEquals("java.util",locale.getPackageName()); assertEquals("java.util",locale2.getPackageName()); assertEquals("java.util",stringList.getPackageName()); @@ -108,7 +108,7 @@ public class TypeTest { } @Test - public void testGetParameters() { + public void GetParameters() { assertEquals(Collections.emptyList(), locale.getParameters()); assertEquals(Collections.emptyList(), locale2.getParameters()); assertEquals(Collections.singletonList(Types.STRING), stringList.getParameters()); @@ -116,7 +116,7 @@ public class TypeTest { } @Test - public void testGetSimpleName() { + public void GetSimpleName() { assertEquals("Locale",locale.getSimpleName()); assertEquals("Locale",locale2.getSimpleName()); assertEquals("List",stringList.getSimpleName()); @@ -124,12 +124,12 @@ public class TypeTest { } @Test - public void testGetJavaClass() { + public void GetJavaClass() { assertEquals(Locale.class,locale.getJavaClass()); } @Test - public void testIsFinal() { + public void IsFinal() { assertTrue(locale.isFinal()); assertTrue(locale2.isFinal()); assertFalse(stringList.isFinal()); @@ -139,7 +139,7 @@ public class TypeTest { } @Test - public void testIsPrimitive() { + public void IsPrimitive() { assertFalse(locale.isPrimitive()); assertFalse(locale2.isPrimitive()); assertFalse(stringList.isPrimitive()); @@ -147,7 +147,7 @@ public class TypeTest { } @Test - public void testGetCategory() { + public void GetCategory() { assertEquals(TypeCategory.SIMPLE, locale.getCategory()); assertEquals(TypeCategory.SIMPLE, locale2.getCategory()); assertEquals(TypeCategory.LIST, stringList.getCategory()); @@ -155,13 +155,13 @@ public class TypeTest { } @Test - public void testAs() { + public void As() { assertEquals(TypeCategory.SIMPLE, stringList.as(TypeCategory.SIMPLE).getCategory()); assertEquals(TypeCategory.SIMPLE, stringList2.as(TypeCategory.SIMPLE).getCategory()); } @Test - public void testGetPrimitiveName() { + public void GetPrimitiveName() { assertNull(locale.getPrimitiveName()); assertNull(locale2.getPrimitiveName()); assertNull(stringList.getPrimitiveName()); @@ -169,7 +169,7 @@ public class TypeTest { } @Test - public void testToString() { + public void ToString() { assertEquals("java.util.Locale",locale.toString()); assertEquals("java.util.Locale",locale2.toString()); assertEquals("java.util.List",stringList.toString()); @@ -177,7 +177,7 @@ public class TypeTest { } @Test - public void testAsArrayType() { + public void AsArrayType() { assertEquals("java.util.Locale[]", locale.asArrayType().getFullName()); assertEquals(TypeCategory.ARRAY, locale.asArrayType().getCategory()); assertEquals("java.util.Locale[]", locale2.asArrayType().getFullName()); diff --git a/src/test/java/com/mysema/codegen/support/ClassUtilsTest.java b/src/test/java/com/mysema/codegen/support/ClassUtilsTest.java index 68ba5f667..8e7122b2c 100644 --- a/src/test/java/com/mysema/codegen/support/ClassUtilsTest.java +++ b/src/test/java/com/mysema/codegen/support/ClassUtilsTest.java @@ -22,7 +22,7 @@ import org.junit.Test; public class ClassUtilsTest { @Test - public void testGetName() { + public void GetName() { assertEquals("Object", ClassUtils.getName(Object.class)); assertEquals("Object[]", ClassUtils.getName(Object[].class)); assertEquals("int", ClassUtils.getName(int.class)); @@ -33,7 +33,7 @@ public class ClassUtilsTest { } @Test - public void testNormalize(){ + public void Normalize(){ assertEquals(List.class, ClassUtils.normalize(ArrayList.class)); assertEquals(Set.class, ClassUtils.normalize(HashSet.class)); assertEquals(Map.class, ClassUtils.normalize(HashMap.class));