Package org.yaac.server.util

Source Code of org.yaac.server.util.EGQLUtilTest

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());
  }
 
}
TOP

Related Classes of org.yaac.server.util.EGQLUtilTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.