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());
}
Aggregations