mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
This commit is contained in:
parent
0cb9670581
commit
43cd6f0f45
@ -5,17 +5,32 @@ import static org.junit.Assert.assertNotNull;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.mysema.query.annotations.PropertyType;
|
||||
import com.mysema.query.types.PathMetadata;
|
||||
|
||||
public class BeanPathTest {
|
||||
|
||||
public static class MyBeanPath extends BeanPath<Object>{
|
||||
|
||||
public MyBeanPath(PathMetadata<?> metadata) {
|
||||
super(Object.class, metadata);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private BeanPath<BeanPathTest> beanPath = new BeanPath<BeanPathTest>(BeanPathTest.class, "p");
|
||||
|
||||
@Test
|
||||
public void As(){
|
||||
public void As_Path(){
|
||||
SimplePath<BeanPathTest> simplePath = new SimplePath<BeanPathTest>(BeanPathTest.class, "p");
|
||||
assertNotNull(beanPath.as(simplePath));
|
||||
}
|
||||
|
||||
// @Test
|
||||
// public void As_Class(){
|
||||
// MyBeanPath otherPath = beanPath.as(MyBeanPath.class);
|
||||
// assertEquals(beanPath, otherPath);
|
||||
// }
|
||||
|
||||
@Test
|
||||
public void CreateEnum(){
|
||||
assertNotNull(beanPath.createEnum("property", PropertyType.class));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user