Search in sources :

Example 1 with ListResult

use of org.activityinfo.legacy.shared.command.result.ListResult in project activityinfo by bedatadriven.

the class AdminEntityCacheTest method testRootLevelCache.

@Test
public void testRootLevelCache() {
    CacheManager proxyMgr = new CacheManager(new MockEventBus());
    new AdminEntityCache(proxyMgr);
    proxyMgr.notifyListenersOfSuccess(new GetAdminEntities(1), DTOs.getProvinces());
    CacheResult<ListResult<AdminEntityDTO>> proxyResult = proxyMgr.execute(new GetAdminEntities(1));
    Assert.assertTrue(proxyResult.isCouldExecute());
    Assert.assertEquals(2, proxyResult.getResult().getData().size());
}
Also used : ListResult(org.activityinfo.legacy.shared.command.result.ListResult) MockEventBus(org.activityinfo.ui.client.MockEventBus) GetAdminEntities(org.activityinfo.legacy.shared.command.GetAdminEntities) Test(org.junit.Test)

Aggregations

GetAdminEntities (org.activityinfo.legacy.shared.command.GetAdminEntities)1 ListResult (org.activityinfo.legacy.shared.command.result.ListResult)1 MockEventBus (org.activityinfo.ui.client.MockEventBus)1 Test (org.junit.Test)1