Search in sources :

Example 6 with ContentChangeHandler

use of org.kie.workbench.common.screens.server.management.client.util.ContentChangeHandler in project kie-wb-common by kiegroup.

the class NewContainerFormPresenterTest method testInit.

@Test
public void testInit() {
    presenter.init();
    final ContentChangeHandler contentChangeHandler = mock(ContentChangeHandler.class);
    presenter.addContentChangeHandler(contentChangeHandler);
    view.setVersion("1.0");
    view.setArtifactId("artifact");
    view.setGroupId("group");
    verify(view).init(presenter);
    verify(wizardPageStatusChangeEvent, times(3)).fire(any(WizardPageStatusChangeEvent.class));
    verify(contentChangeHandler, times(3)).onContentChange();
}
Also used : ContentChangeHandler(org.kie.workbench.common.screens.server.management.client.util.ContentChangeHandler) WizardPageStatusChangeEvent(org.uberfire.ext.widgets.core.client.wizards.WizardPageStatusChangeEvent) Test(org.junit.Test)

Aggregations

ContentChangeHandler (org.kie.workbench.common.screens.server.management.client.util.ContentChangeHandler)6 WizardPageStatusChangeEvent (org.uberfire.ext.widgets.core.client.wizards.WizardPageStatusChangeEvent)5 InvocationOnMock (org.mockito.invocation.InvocationOnMock)3 Answer (org.mockito.stubbing.Answer)3 Before (org.junit.Before)2 Test (org.junit.Test)2 SpecManagementService (org.kie.workbench.common.screens.server.management.service.SpecManagementService)2 Field (java.lang.reflect.Field)1 PostConstruct (javax.annotation.PostConstruct)1 M2RepoService (org.guvnor.m2repo.service.M2RepoService)1