Search in sources :

Example 61 with ServerTemplate

use of org.kie.server.controller.api.model.spec.ServerTemplate in project kie-wb-common by kiegroup.

the class NewContainerFormPresenterTest method testIsFieldValid.

@Test
public void testIsFieldValid() {
    when(view.getContainerName()).thenReturn(" ");
    when(view.getGroupId()).thenReturn(" ");
    when(view.getArtifactId()).thenReturn(" ");
    when(view.getVersion()).thenReturn(" ");
    assertTrue(presenter.isContainerNameValid());
    assertTrue(presenter.isGroupIdValid());
    assertTrue(presenter.isArtifactIdValid());
    assertTrue(presenter.isVersionValid());
    presenter.setServerTemplate(new ServerTemplate());
    assertFalse(presenter.isContainerNameValid());
    assertFalse(presenter.isGroupIdValid());
    assertFalse(presenter.isArtifactIdValid());
    assertFalse(presenter.isVersionValid());
}
Also used : ServerTemplate(org.kie.server.controller.api.model.spec.ServerTemplate) Test(org.junit.Test)

Aggregations

ServerTemplate (org.kie.server.controller.api.model.spec.ServerTemplate)61 Test (org.junit.Test)49 ContainerSpec (org.kie.server.controller.api.model.spec.ContainerSpec)24 ServerTemplateKey (org.kie.server.controller.api.model.spec.ServerTemplateKey)12 ServerInstanceKey (org.kie.server.controller.api.model.runtime.ServerInstanceKey)11 RuleConfig (org.kie.server.controller.api.model.spec.RuleConfig)10 ArrayList (java.util.ArrayList)9 Capability (org.kie.server.controller.api.model.spec.Capability)9 ContainerConfig (org.kie.server.controller.api.model.spec.ContainerConfig)9 Path (org.uberfire.java.nio.file.Path)9 ReleaseId (org.kie.server.api.model.ReleaseId)8 ProcessConfig (org.kie.server.controller.api.model.spec.ProcessConfig)8 Command (org.uberfire.mvp.Command)7 ParameterizedCommand (org.uberfire.mvp.ParameterizedCommand)7 Matchers.anyString (org.mockito.Matchers.anyString)6 HashMap (java.util.HashMap)5 List (java.util.List)5 Container (org.kie.server.controller.api.model.runtime.Container)5 ValidateExistingContainerCallback (org.kie.workbench.common.screens.projecteditor.client.editor.DeploymentScreenPopupViewImpl.ValidateExistingContainerCallback)5 ServerTemplateSelected (org.kie.workbench.common.screens.server.management.client.events.ServerTemplateSelected)5