Search in sources :

Example 1 with LoadContentAnswer

use of org.kie.workbench.common.screens.projectimportsscreen.client.forms.answer.LoadContentAnswer in project kie-wb-common by kiegroup.

the class ProjectImportsScreenPresenterTest method verifyShowHide.

private void verifyShowHide(boolean positive) {
    when(serviceCaller.call(any(RemoteCallback.class), any(ErrorCallback.class))).thenAnswer(new LoadContentAnswer(importsService, importsContent, positive ? null : errorCallback));
    presenter.init(path, placeRequest);
    verify(view).showLoading();
    if (positive) {
        verify(view).hideBusyIndicator();
    } else {
        verify(errorCallback).error(any(Message.class), any(Throwable.class));
    }
}
Also used : LoadContentAnswer(org.kie.workbench.common.screens.projectimportsscreen.client.forms.answer.LoadContentAnswer) Message(org.jboss.errai.bus.client.api.messaging.Message) ErrorCallback(org.jboss.errai.common.client.api.ErrorCallback) HasBusyIndicatorDefaultErrorCallback(org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback) RemoteCallback(org.jboss.errai.common.client.api.RemoteCallback)

Aggregations

Message (org.jboss.errai.bus.client.api.messaging.Message)1 ErrorCallback (org.jboss.errai.common.client.api.ErrorCallback)1 RemoteCallback (org.jboss.errai.common.client.api.RemoteCallback)1 LoadContentAnswer (org.kie.workbench.common.screens.projectimportsscreen.client.forms.answer.LoadContentAnswer)1 HasBusyIndicatorDefaultErrorCallback (org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback)1