use of org.kie.workbench.common.screens.projecteditor.client.editor.DeploymentScreenPopupViewImpl.ValidateExistingContainerCallback in project kie-wb-common by kiegroup.
the class DeploymentPopupBuilderTest method testMultipleServerTemplatesValidationWhenContainerNameDoesNotExist.
@Test
public void testMultipleServerTemplatesValidationWhenContainerNameDoesNotExist() throws Exception {
final List<ServerTemplate> serverTemplates = new ArrayList<ServerTemplate>() {
{
add(serverTemplate("serverTemplate1", "container1", "container2"));
add(serverTemplate("serverTemplate2", "container1", "container2", "container3"));
add(serverTemplate("serverTemplate3", "container1", "container2"));
}
};
doNothing().when(popupView).addServerTemplates(any());
doReturn("serverTemplate1").when(popupView).getServerTemplate();
final ValidateExistingContainerCallback validation = builder.multipleServerTemplatesValidation(serverTemplates);
assertFalse(validation.containerNameExists("container3"));
}
Aggregations