This commit is contained in:
Timo Westkämper 2009-01-04 14:57:45 +00:00
parent 2058167219
commit cc6e830f50
2 changed files with 5 additions and 13 deletions

View File

@ -357,17 +357,7 @@ public class FeaturesTest extends HqlQueryBase<FeaturesTest>{
toString("cat.name like :a1",cat.name.like("A%"));
toString("lower(cat.name)",cat.name.lower());
}
@Test
@Ignore
public void testSubQuery(){
// TODO : make the comparison work again
StringBuilder b = new StringBuilder();
b.append("(select cust.name from cust");
b.append(" where cust.name is not null)");
toString(b.toString(), HqlGrammar.select(cust.name).from(cust).where(cust.name.isnotnull()));
}
@Test
public void testToString(){
toString("cat", cat);

View File

@ -5,6 +5,7 @@
*/
package com.mysema.query.util;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.util.Properties;
@ -62,8 +63,9 @@ public class HibernateTestRunner extends JUnit4ClassRunner{
Hibernate config = getTestClass().getJavaClass().getAnnotation(Hibernate.class);
cfg.setNamingStrategy(config.namingStrategy().newInstance());
Properties props = new Properties();
// TODO : null check and error message
props.load(HqlIntegrationTest.class.getResourceAsStream(config.properties()));
InputStream is = HqlIntegrationTest.class.getResourceAsStream(config.properties());
if (is == null) throw new IllegalArgumentException("No configuration available at classpath:" + config.properties());
props.load(is);
cfg.setProperties(props);
sessionFactory = cfg.buildSessionFactory();
super.run(notifier);