mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-24 21:07:26 +08:00
This commit is contained in:
parent
eb82e3aa5e
commit
f617860225
@ -5,8 +5,6 @@
|
||||
*/
|
||||
package com.mysema.query.collections;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import org.junit.Test;
|
||||
@ -15,14 +13,12 @@ import com.mysema.query.types.path.PathInits;
|
||||
|
||||
public class TypeCastTest {
|
||||
|
||||
@Test
|
||||
@Test(expected=IllegalStateException.class)
|
||||
public void Cast() {
|
||||
QAnimal animal = QAnimal.animal;
|
||||
QCat cat = new QCat(animal.getMetadata(), new PathInits("*"));
|
||||
System.out.println(cat);
|
||||
|
||||
ColQuery query = MiniApi.from(animal, Collections.<Animal> emptyList()).from(cat, Collections.<Cat> emptyList());
|
||||
assertEquals(1, ((ColQueryImpl) query).getMetadata().getJoins().size());
|
||||
MiniApi.from(animal, Collections.<Animal> emptyList()).from(cat, Collections.<Cat> emptyList());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user