use of org.kie.workbench.common.screens.server.management.client.events.ServerInstanceSelected in project kie-wb-common by kiegroup.
the class RemotePresenterTest method testRemoveError.
@Test
public void testRemoveError() {
final ServerInstanceKey serverInstanceKey = new ServerInstanceKey("templateId", "serverName", "serverInstanceId", "url");
presenter.onSelect(new ServerInstanceSelected(serverInstanceKey));
doThrow(new RuntimeException()).when(specManagementService).deleteServerInstance(serverInstanceKey);
presenter.remove();
final ArgumentCaptor<NotificationEvent> notificationCaptor = ArgumentCaptor.forClass(NotificationEvent.class);
verify(notification).fire(notificationCaptor.capture());
assertEquals(NotificationEvent.NotificationType.ERROR, notificationCaptor.getValue().getType());
}
Aggregations