package org.yaac.shared.property;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.yaac.server.util.AutoBeanUtil;
import org.yaac.shared.egql.ResultCell;
/**
* @author Max Zhu (thebbsky@gmail.com)
*
*/
public class BlobKeyPropertyInfoTest {
@Test
public void testEncodeDecode() {
BlobKeyPropertyInfo blob = new BlobKeyPropertyInfo("key2");
ResultCell cell = blob.populateResultCell(AutoBeanUtil.getResultCellFactory());
assertEquals(blob, PropertyInfo.Builder.fromResultCell(cell));
}
@Test
public void testAsExpression() {
assertEquals("blobkey('abc')", new BlobKeyPropertyInfo("abc").asExpression(null));
}
}