use of org.kie.workbench.common.screens.server.management.service.RuleCapabilitiesService in project kie-wb-common by kiegroup.
the class ContainerRulesConfigPresenterTest method init.
@Before
public void init() {
releaseId = new ReleaseId();
releaseId.setVersion("0.1");
doNothing().when(notification).fire(any(NotificationEvent.class));
ruleCapabilitiesServiceCaller = new CallerMock<RuleCapabilitiesService>(ruleCapabilitiesService);
when(containerSpec.getReleasedId()).thenReturn(releaseId);
when(view.getUpgradeSuccessMessage()).thenReturn(SUCCESS_UPGRADE);
presenter = new ContainerRulesConfigPresenter(logger, view, ruleCapabilitiesServiceCaller, notification);
doAnswer(new Answer() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
releaseId.setVersion(invocation.getArgumentAt(1, ReleaseId.class).getVersion());
return null;
}
}).when(ruleCapabilitiesService).upgradeContainer(any(ContainerSpecKey.class), any(ReleaseId.class));
}
Aggregations