Search in sources :

Example 1 with TestingStorageProvider

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

the class FieldTreeBuilderTest method subForms.

@Test
public void subForms() {
    FormSource formStore = new FormSourceSyncImpl(new TestingStorageProvider(), 1);
    FormTree tree = formStore.getFormTree(ReferralSubForm.FORM_ID).waitFor();
    TreeStore<MeasureTreeNode> treeStore = new TreeStore<>(MeasureTreeNode::getId);
    FieldTreeBuilder builder = new FieldTreeBuilder(tree, treeStore);
    try {
        builder.build(tree);
    } catch (Exception e) {
        e.printStackTrace();
    }
    System.out.println("===== FormTree === ");
    FormTreePrettyPrinter.print(tree);
    System.out.println();
    System.out.println("===== TreeStore === ");
    prettyPrint(treeStore);
}
Also used : TreeStore(com.sencha.gxt.data.shared.TreeStore) FormTree(org.activityinfo.model.formTree.FormTree) TestingStorageProvider(org.activityinfo.store.testing.TestingStorageProvider) FormSourceSyncImpl(org.activityinfo.store.query.server.FormSourceSyncImpl) FormSource(org.activityinfo.store.query.shared.FormSource) Test(org.junit.Test)

Example 2 with TestingStorageProvider

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

the class XlsTableWriterTest method setup.

@Before
public void setup() {
    LocaleProxy.initialize();
    catalog = new TestingStorageProvider();
    formSource = new FormSourceSyncImpl(catalog, 1);
}
Also used : TestingStorageProvider(org.activityinfo.store.testing.TestingStorageProvider) FormSourceSyncImpl(org.activityinfo.store.query.server.FormSourceSyncImpl) Before(org.junit.Before)

Aggregations

FormSourceSyncImpl (org.activityinfo.store.query.server.FormSourceSyncImpl)2 TestingStorageProvider (org.activityinfo.store.testing.TestingStorageProvider)2 TreeStore (com.sencha.gxt.data.shared.TreeStore)1 FormTree (org.activityinfo.model.formTree.FormTree)1 FormSource (org.activityinfo.store.query.shared.FormSource)1 Before (org.junit.Before)1 Test (org.junit.Test)1