Search in sources :

Example 1 with ListResult

use of org.activityinfo.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.shared.command.result.ListResult) MockEventBus(org.activityinfo.client.MockEventBus) GetAdminEntities(org.activityinfo.shared.command.GetAdminEntities) Test(org.junit.Test)

Aggregations

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