use of org.guvnor.m2repo.service.M2RepoService in project kie-wb-common by kiegroup.
the class NewContainerFormPresenterTest method init.
@Before
public void init() {
contentChangeHandlers.clear();
m2RepoServiceCaller = new CallerMock<M2RepoService>(m2RepoService);
specManagementServiceCaller = new CallerMock<SpecManagementService>(specManagementService);
doNothing().when(wizardPageStatusChangeEvent).fire(any(WizardPageStatusChangeEvent.class));
doAnswer(new Answer() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
final ContentChangeHandler handler = (ContentChangeHandler) invocation.getArguments()[0];
contentChangeHandlers.add(handler);
return null;
}
}).when(view).addContentChangeHandler(any(ContentChangeHandler.class));
doAnswer(contentHandlerAnswer).when(view).setArtifactId(anyString());
doAnswer(contentHandlerAnswer).when(view).setGroupId(anyString());
doAnswer(contentHandlerAnswer).when(view).setVersion(anyString());
presenter = spy(new NewContainerFormPresenter(logger, view, presenterProvider, m2RepoServiceCaller, specManagementServiceCaller, wizardPageStatusChangeEvent));
doReturn(artifactListWidgetPresenter).when(presenterProvider).get();
}
Aggregations