@@ -0,0 +1,1734 @@
+/*%0A * Copyright 2010-11 Brookhaven National Laboratory%0A * All rights reserved. Use is subject to license terms.%0A */%0Apackage org.epics.pvmanager.data;%0A%0Aimport java.util.Arrays;%0Aimport java.util.List;%0Aimport org.epics.pvmanager.expression.DesiredRateExpression;%0Aimport org.junit.Test;%0Aimport static org.junit.Assert.*;%0Aimport static org.hamcrest.Matchers.*;%0Aimport static org.epics.pvmanager.data.ExpressionLanguage.*;%0A%0A/**%0A *%0A * @author carcassi%0A */%0Apublic class VTableAggegationTest %7B%0A    %0A    @Test%0A    public void aggregateSimpleTable() throws Exception %7B%0A        List%3CString%3E names = Arrays.asList(%22One%22, %22Two%22, %22Three%22);%0A        List%3CDouble%3E values = Arrays.asList(1.0, 2.0, 3.0);%0A        List%3CInteger%3E counts = Arrays.asList(1, 2, 3);%0A        DesiredRateExpression%3CVTable%3E exp = vTable(column(%22Names%22, vStringConstants(names)), column(%22Values%22, vDoubleConstants(values)), column(%22Counts%22, vIntConstants(counts)));%0A        VTable result = exp.getFunction().getValue();%0A        assertThat(result.getColumnCount(), equalTo(3));%0A        assertThat(result.getColumnName(0), equalTo(%22Names%22));%0A        assertThat(result.getColumnType(0), equalTo((Class) String.class));%0A        assertThat(result.getColumnArray(0), equalTo((Object) new String%5B%5D%7B%22One%22, %22Two%22, %22Three%22%7D));%0A        assertThat(result.getColumnName(1), equalTo(%22Values%22));%0A        assertThat(result.getColumnType(1), equalTo((Class) Double.TYPE));%0A        assertThat(result.getColumnArray(1), equalTo((Object) new double%5B%5D%7B1.0, 2.0, 3.0%7D));%0A        assertThat(result.getColumnName(2), equalTo(%22Counts%22));%0A        assertThat(result.getColumnType(2), equalTo((Class) Integer.TYPE));%0A        assertThat(result.getColumnArray(2), equalTo((Object) new int%5B%5D%7B1, 2, 3%7D));%0A    %7D%0A%7D%0A

test for table aggregation.