Search in sources :

Example 1 with ListKeyExpression

use of com.apple.foundationdb.record.metadata.expressions.ListKeyExpression in project fdb-record-layer by FoundationDB.

the class KeyExpressionTest method testSerializeList.

@Test
public void testSerializeList() throws Exception {
    final ListKeyExpression list = list(field("f1"), field("f2"));
    final ListKeyExpression then = new ListKeyExpression(list.toProto());
    assertEquals(2, then.getChildren().size());
    assertEquals("f2", ((FieldKeyExpression) then.getChildren().get(1)).getFieldName());
}
Also used : ListKeyExpression(com.apple.foundationdb.record.metadata.expressions.ListKeyExpression) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

ListKeyExpression (com.apple.foundationdb.record.metadata.expressions.ListKeyExpression)1 Test (org.junit.jupiter.api.Test)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1