Search in sources :

Example 1 with IBeanDtosClearUpdate

use of org.jowidgets.cap.common.api.bean.IBeanDtosClearUpdate in project jo-client-platform by jo-source.

the class BeanTableModelImplTest method testClearUpdateClears.

@Test
public void testClearUpdateClears() {
    tableModel.load();
    triggerPageLoading();
    final IUpdatableResultCallback<IBeanDtosUpdate, List<IBeanDto>> updatableCallback = assertUpdatableResultCallback(resultCallback);
    updatableCallback.finished(new ArrayList<IBeanDto>());
    updatableCallback.update(new BeanDtosInsertionUpdate(Arrays.asList((IBeanDto) bean1, (IBeanDto) bean2)));
    updatableCallback.update(new IBeanDtosClearUpdate() {
    });
    final int size = tableModel.getSize();
    assertTrue("table should be clear but " + size + " bean(s) remained", size == 0);
}
Also used : IBeanDto(org.jowidgets.cap.common.api.bean.IBeanDto) ArrayList(java.util.ArrayList) LinkedList(java.util.LinkedList) List(java.util.List) IBeanDtosUpdate(org.jowidgets.cap.common.api.bean.IBeanDtosUpdate) IBeanDtosClearUpdate(org.jowidgets.cap.common.api.bean.IBeanDtosClearUpdate) BeanDtosInsertionUpdate(org.jowidgets.cap.common.tools.bean.BeanDtosInsertionUpdate) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 IBeanDto (org.jowidgets.cap.common.api.bean.IBeanDto)1 IBeanDtosClearUpdate (org.jowidgets.cap.common.api.bean.IBeanDtosClearUpdate)1 IBeanDtosUpdate (org.jowidgets.cap.common.api.bean.IBeanDtosUpdate)1 BeanDtosInsertionUpdate (org.jowidgets.cap.common.tools.bean.BeanDtosInsertionUpdate)1 Test (org.junit.Test)1