package org.yaac.server.util;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import org.junit.Test;
import org.yaac.server.egql.EGQLUtil;
import org.yaac.server.egql.EntityProperty;
/**
* @author Max Zhu (thebbsky@gmail.com)
*
*/
public class EGQLUtilTest {
/**
*
*/
@Test
public void testParseEntityProperty() {
EntityProperty p1 = EGQLUtil.parseEntityProperty("a.b");
assertEquals("a", p1.getEntityName());
assertEquals("b", p1.getPropertyName());
EntityProperty p2 = EGQLUtil.parseEntityProperty("c");
assertNull(p2.getEntityName());
assertEquals("c", p2.getPropertyName());
}
}