Search in sources :

Example 6 with DispatcherStub

use of org.activityinfo.client.dispatch.DispatcherStub in project activityinfo by bedatadriven.

the class SiteAdminTreeLoaderTest method load.

@Test
public void load() {
    DispatcherStub dispatcher = new DispatcherStub();
    dispatcher.setResult(new GetSchema(), DTOs.PEAR.SCHEMA);
    dispatcher.setResult(new GetAdminEntities(1), DTOs.PROVINCES);
    SiteAdminTreeLoader loader = new SiteAdminTreeLoader(dispatcher, new AdminGroupingModel(1));
    new TreeStore<ModelData>(loader);
    loader.load();
}
Also used : AdminGroupingModel(org.activityinfo.client.page.entry.grouping.AdminGroupingModel) TreeStore(com.extjs.gxt.ui.client.store.TreeStore) DispatcherStub(org.activityinfo.client.dispatch.DispatcherStub) GetAdminEntities(org.activityinfo.shared.command.GetAdminEntities) GetSchema(org.activityinfo.shared.command.GetSchema) Test(org.junit.Test)

Aggregations

DispatcherStub (org.activityinfo.client.dispatch.DispatcherStub)6 Test (org.junit.Test)6 MockEventBus (org.activityinfo.client.MockEventBus)5 UIConstants (org.activityinfo.client.i18n.UIConstants)5 StateManagerStub (org.activityinfo.client.mock.StateManagerStub)5 SchemaDTO (org.activityinfo.shared.dto.SchemaDTO)5 VoidResult (org.activityinfo.shared.command.result.VoidResult)4 TreeStore (com.extjs.gxt.ui.client.store.TreeStore)3 ActivityDTO (org.activityinfo.shared.dto.ActivityDTO)3 Record (com.extjs.gxt.ui.client.store.Record)2 UpdateEntity (org.activityinfo.shared.command.UpdateEntity)2 ModelData (com.extjs.gxt.ui.client.data.ModelData)1 NavigationCallback (org.activityinfo.client.page.NavigationCallback)1 ConfirmCallback (org.activityinfo.client.page.common.grid.ConfirmCallback)1 AdminGroupingModel (org.activityinfo.client.page.entry.grouping.AdminGroupingModel)1 DataEntryPlace (org.activityinfo.client.page.entry.place.DataEntryPlace)1 Delete (org.activityinfo.shared.command.Delete)1 GetAdminEntities (org.activityinfo.shared.command.GetAdminEntities)1 GetSchema (org.activityinfo.shared.command.GetSchema)1 CreateResult (org.activityinfo.shared.command.result.CreateResult)1