This commit is contained in:
Timo Westkämper 2010-10-13 13:36:26 +00:00
parent 0cb9670581
commit 43cd6f0f45

View File

@ -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));