Search in sources :

Example 1 with OpenShiftClientValidationService

use of org.guvnor.ala.ui.openshift.client.validation.OpenShiftClientValidationService in project kie-wb-common by kiegroup.

the class TemplateParamsFormPresenterTest method setUp.

@Before
public void setUp() {
    when(popupHelper.getPopupErrorCallback()).thenReturn(errorCallback);
    exceptionCaptor = ArgumentCaptor.forClass(Throwable.class);
    initializeParams();
    when(templateDescriptorModel.getParams()).thenReturn(allTemplateParams);
    when(paramsEditorPresenter.getView()).thenReturn(paramsEditorPresenterView);
    openshiftClientServiceCaller = spy(new CallerMock<>(openShiftClientService));
    openShiftClientValidationService = new OpenShiftClientValidationService(openshiftClientServiceCaller);
    presenter = spy(new TemplateParamsFormPresenter(view, paramsEditorPresenter, translationService, popupHelper, openshiftClientServiceCaller, openShiftClientValidationService));
    presenter.init();
    verify(view, times(1)).init(presenter);
    verify(view, times(1)).setParamsEditorPresenter(paramsEditorPresenterView);
    verify(paramsEditorPresenter, times(1)).setParamChangeHandler(any());
}
Also used : OpenShiftClientValidationService(org.guvnor.ala.ui.openshift.client.validation.OpenShiftClientValidationService) CallerMock(org.uberfire.mocks.CallerMock) Before(org.junit.Before)

Aggregations

OpenShiftClientValidationService (org.guvnor.ala.ui.openshift.client.validation.OpenShiftClientValidationService)1 Before (org.junit.Before)1 CallerMock (org.uberfire.mocks.CallerMock)1