use of org.kie.server.controller.api.model.events.ServerTemplateUpdated in project kie-wb-common by kiegroup.
the class ServerManagementBrowserPresenterTest method testOnServerTemplateUpdated.
@Test
public void testOnServerTemplateUpdated() {
final ServerTemplate serverTemplate = new ServerTemplate("ServerTemplateId", "ServerTemplateName");
presenter.onServerTemplateUpdated(new ServerTemplateUpdated(serverTemplate));
final ArgumentCaptor<Collection> serverTemplateKeysCaptor = ArgumentCaptor.forClass(Collection.class);
verify(navigationPresenter).setup(eq(serverTemplate), serverTemplateKeysCaptor.capture());
final Collection<ServerTemplateKey> serverTemplateKeys = serverTemplateKeysCaptor.getValue();
assertEquals(1, serverTemplateKeys.size());
assertTrue(serverTemplateKeys.contains(serverTemplate));
final ArgumentCaptor<ServerTemplateSelected> templateSelectedCaptor = ArgumentCaptor.forClass(ServerTemplateSelected.class);
verify(serverTemplateSelectedEvent).fire(templateSelectedCaptor.capture());
assertEquals(serverTemplate, templateSelectedCaptor.getValue().getServerTemplateKey());
}
use of org.kie.server.controller.api.model.events.ServerTemplateUpdated in project kie-wb-common by kiegroup.
the class ServerNavigationPresenterTest method testOnServerTemplateUpdated.
@Test
public void testOnServerTemplateUpdated() {
final ServerTemplate serverTemplate = new ServerTemplate("ServerTemplateKeyId", "ServerTemplateKeyName");
presenter.onServerTemplateUpdated(new ServerTemplateUpdated(serverTemplate));
verify(view).addTemplate(serverTemplate.getId(), serverTemplate.getName());
}
Aggregations