Search in sources :

Example 1 with LocaliteForm

use of org.activityinfo.store.testing.LocaliteForm in project activityinfo by bedatadriven.

the class TableViewModelTest method testClassicAdminHierarchy.

@Test
public void testClassicAdminHierarchy() {
    LocaliteForm localiteForm = setup.getCatalog().getLocaliteForm();
    TableModel tableModel = ImmutableTableModel.builder().formId(localiteForm.getFormId()).build();
    TableViewModel viewModel = new TableViewModel(setup.getFormStore(), tableModel);
    EffectiveTableModel effectiveTable = setup.connect(viewModel.getEffectiveTable()).assertLoaded();
    for (EffectiveTableColumn tableColumn : effectiveTable.getColumns()) {
        System.out.println(tableColumn.getLabel() + " => " + tableColumn.getFormula().getFormula());
    }
}
Also used : LocaliteForm(org.activityinfo.store.testing.LocaliteForm) TableModel(org.activityinfo.model.analysis.TableModel) ImmutableTableModel(org.activityinfo.model.analysis.ImmutableTableModel) Test(org.junit.Test)

Aggregations

ImmutableTableModel (org.activityinfo.model.analysis.ImmutableTableModel)1 TableModel (org.activityinfo.model.analysis.TableModel)1 LocaliteForm (org.activityinfo.store.testing.LocaliteForm)1 Test (org.junit.Test)1