Fix APT tests

This commit is contained in:
Timo Westkämper 2014-05-05 22:18:10 +03:00
parent c2d2166644
commit d720e70f22
3 changed files with 9 additions and 16 deletions

View File

@ -71,7 +71,7 @@ public abstract class AbstractProcessorTest {
// Processor.elementCache.clear();
if (compilationResult != 0) {
System.err.println(compiler.getClass().getName());
Assert.fail("Compilation Failed");
Assert.fail("Compilation Failed:\n " + new String(err.toByteArray(), "UTF-8"));
}
}

View File

@ -1,20 +1,11 @@
package com.mysema.query.apt;
import static org.junit.Assert.fail;
import javax.persistence.*;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Embeddable;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;
import org.junit.Test;
import com.google.common.base.Charsets;
import com.google.common.collect.ForwardingSet;
import com.google.common.io.Files;
@ -24,6 +15,8 @@ import com.mysema.query.codegen.Keywords;
import com.mysema.query.domain.AbstractEntityTest;
import com.mysema.query.domain.CustomCollection;
import com.mysema.query.domain.Generic2Test;
import org.junit.Test;
import static org.junit.Assert.fail;
public class GenericExporterTest extends AbstractProcessorTest {
@ -50,6 +43,7 @@ public class GenericExporterTest extends AbstractProcessorTest {
expected.add("QExampleEntity.java");
expected.add("QQueryProjectionTest_DTOWithProjection.java");
expected.add("QQueryProjectionTest_EntityWithProjection.java");
// FIXME
expected.add("QExternalEntityTest_MyEntity.java");
@ -87,6 +81,7 @@ public class GenericExporterTest extends AbstractProcessorTest {
expected.add("QTemporal2Test_Cheque.java");
expected.add("QQueryProjectionTest_DTOWithProjection.java");
expected.add("QQueryProjectionTest_EntityWithProjection.java");
// FIXME
expected.add("QGeneric4Test_HidaBez.java");

View File

@ -1,22 +1,20 @@
package com.mysema.query.domain;
import static org.junit.Assert.assertEquals;
import java.util.Collection;
import java.util.Locale;
import java.util.Set;
import org.junit.Test;
import com.mysema.query.annotations.QueryEmbedded;
import com.mysema.query.annotations.QueryEntity;
import com.mysema.query.types.path.NumberPath;
import com.mysema.query.types.path.StringPath;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class QueryEmbedded7Test {
@QueryEntity
static class Entity {
public static class Entity {
@QueryEmbedded
Collection<String> users;